The Rectangle class represents a rectangle.
More...
#include <rectangle.h>
The Rectangle class represents a rectangle.
- Author
- Sam Twidale (https://samcodes.co.uk/)
◆ Rectangle() [1/2]
geometrize::Rectangle::Rectangle |
( |
| ) |
|
|
default |
◆ Rectangle() [2/2]
geometrize::Rectangle::Rectangle |
( |
float |
x1, |
|
|
float |
y1, |
|
|
float |
x2, |
|
|
float |
y2 |
|
) |
| |
12{
17}
float m_y1
Top coordinate.
Definition: rectangle.h:25
float m_x2
Right coordinate.
Definition: rectangle.h:26
float m_y2
Bottom coordinate.
Definition: rectangle.h:27
float m_x1
Left coordinate.
Definition: rectangle.h:24
◆ clone()
clone Clones the shape, a virtual copy constructor.
- Returns
- A clone of the shape.
Reimplemented from geometrize::Shape.
20{
21 std::shared_ptr<geometrize::Rectangle> rect{std::make_shared<geometrize::Rectangle>()};
29 return rect;
30}
std::function< std::vector< geometrize::Scanline >(const geometrize::Shape &)> rasterize
Definition: shape.h:27
std::function< void(geometrize::Shape &)> setup
Definition: shape.h:25
std::function< void(geometrize::Shape &)> mutate
Definition: shape.h:26
◆ getType()
getType Gets the ShapeType of the shape.
- Returns
- The ShapeType of the shape.
Reimplemented from geometrize::Shape.
33{
35}
@ RECTANGLE
Definition: shapetypes.h:18
◆ m_x1
float geometrize::Rectangle::m_x1 |
◆ m_x2
float geometrize::Rectangle::m_x2 |
◆ m_y1
float geometrize::Rectangle::m_y1 |
◆ m_y2
float geometrize::Rectangle::m_y2 |
The documentation for this class was generated from the following files:
- /home/appveyor/projects/geometrize-lib-docs/geometrize-lib/geometrize/geometrize/shape/rectangle.h
- /home/appveyor/projects/geometrize-lib-docs/geometrize-lib/geometrize/geometrize/shape/rectangle.cpp