Bomberman
Line.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2021
3 ** Bomberman
4 ** File description:
5 ** Pixel
6 */
7 
8 #ifndef LINE_HPP_
9 #define LINE_HPP_
10 
11 #include <raylib.h>
13 
16  class Line: public ADrawable2D
17  {
18  public:
19 
24  Line(const Vector2 &startPosition, const Vector2 &endPosition, const Color &);
25 
33  Line(int xStart, int yStart, int xEnd, int yEnd, const Color &);
34 
36  Line(const Line &) = default;
37 
39  Line &operator=(const Line &) = default;
40 
42  ~Line() override = default;
43 
45  const Vector2 &getEndPosition(void) const;
46 
48  Line &setEndPosition(const Vector2 &);
49 
51  void drawOn(RAY::Window &) override;
53  void drawOn(RAY::Image &image) override;
54 
55  private:
58  };
59 };
60 
61 #endif /* !PIXEL_HPP_ */
RAY::Drawables::Drawables2D::Line
Line in a two-dimensionnal space.
Definition: Line.hpp:16
RAY::Window
Definition: Window.hpp:32
RAY::Drawables::Drawables2D::Line::drawOn
void drawOn(RAY::Window &) override
Draw point on window.
Definition: Line.cpp:35
RAY::Vector2
A Two-dimensionnal Vector data type.
Definition: Vector2.hpp:15
RAY::Drawables::Drawables2D::Line::operator=
Line & operator=(const Line &)=default
A line is assignable.
RAY::Drawables::Drawables2D::Line::Line
Line(const Vector2 &startPosition, const Vector2 &endPosition, const Color &)
Line constructor.
Definition: Line.cpp:14
RAY::Drawables::Drawables2D::Line::_end
Vector2 _end
Positon of the end of the line.
Definition: Line.hpp:57
RAY::Drawables::Drawables2D::Line::~Line
~Line() override=default
A default destructor.
RAY::Image
Object representation of a framebuffer.
Definition: Image.hpp:20
RAY::Drawables::Drawables2D::Line::setEndPosition
Line & setEndPosition(const Vector2 &)
set the end position of the line
Definition: Line.cpp:29
RAY::Drawables::Drawables2D::Line::getEndPosition
const Vector2 & getEndPosition(void) const
Definition: Line.cpp:24
RAY::Color
Object representation of color.
Definition: Color.hpp:15
RAY::Drawables::ADrawable2D
Abstraction of any two-dimensionnal drawable.
Definition: ADrawable2D.hpp:21
ADrawable2D.hpp
RAY::Drawables::Drawables2D
Definition: Circle.cpp:11