The Line class represents a simple line.
More...
#include <line.h>
The Line class represents a simple line.
- Author
- Sam Twidale (https://samcodes.co.uk/)
◆ Line() [1/2]
geometrize::Line::Line |
( |
| ) |
|
|
default |
◆ Line() [2/2]
geometrize::Line::Line |
( |
float |
x1, |
|
|
float |
y1, |
|
|
float |
x2, |
|
|
float |
y2 |
|
) |
| |
12{
17}
float m_y1
First y-coordinate.
Definition: line.h:25
float m_y2
Second y-coordinate.
Definition: line.h:27
float m_x2
Second x-coordinate.
Definition: line.h:26
float m_x1
First x-coordinate.
Definition: line.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::Line> line{std::make_shared<geometrize::Line>()};
29 return line;
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}
@ LINE
Definition: shapetypes.h:24
◆ m_x1
float geometrize::Line::m_x1 |
◆ m_x2
float geometrize::Line::m_x2 |
◆ m_y1
float geometrize::Line::m_y1 |
◆ m_y2
float geometrize::Line::m_y2 |
The documentation for this class was generated from the following files:
- /home/appveyor/projects/geometrize-lib-docs/geometrize-lib/geometrize/geometrize/shape/line.h
- /home/appveyor/projects/geometrize-lib-docs/geometrize-lib/geometrize/geometrize/shape/line.cpp