2D graphics primitive representing an ellipse.
More...
#include <EllipsePrimitive2D.hpp>
2D graphics primitive representing an ellipse.
◆ SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated EllipsePrimitive2D instances.
◆ EllipsePrimitive2D() [1/2]
| CDPL::Vis::EllipsePrimitive2D::EllipsePrimitive2D |
( |
| ) |
|
|
inline |
Constructs an undefined ellipse primitive.
◆ EllipsePrimitive2D() [2/2]
| CDPL::Vis::EllipsePrimitive2D::EllipsePrimitive2D |
( |
const Math::Vector2D & |
pos, |
|
|
double |
width, |
|
|
double |
height |
|
) |
| |
|
inline |
Constructs an ellipse primitive centered at pos with the given diameters.
- Parameters
-
| pos | The center position of the ellipse. |
| width | The diameter of the ellipse in x-direction. |
| height | The diameter of the ellipse in y-direction. |
◆ render()
| void CDPL::Vis::EllipsePrimitive2D::render |
( |
Renderer2D & |
renderer | ) |
const |
|
virtual |
Renders the ellipse via renderer using the configured pen and brush.
- Parameters
-
| renderer | The renderer that performs the drawing operations. |
Implements CDPL::Vis::GraphicsPrimitive2D.
◆ setPen()
| void CDPL::Vis::EllipsePrimitive2D::setPen |
( |
const Pen & |
pen | ) |
|
Sets the pen defining the color, width, line style, cap style and join style of the ellipse outline.
- Parameters
-
| pen | The pen defining the color, width, line style, cap style and join style of the ellipse's outline. |
◆ getPen()
| const Pen& CDPL::Vis::EllipsePrimitive2D::getPen |
( |
| ) |
const |
Returns the pen defining the color, width, line style, cap style and join style of the ellipse outline.
- Returns
- The pen defining the color, width, line style, cap style and join style of the ellipse outline.
◆ setBrush()
| void CDPL::Vis::EllipsePrimitive2D::setBrush |
( |
const Brush & |
brush | ) |
|
Sets the brush defining the fill color and fill pattern.
- Parameters
-
| brush | The brush defining the fill color and fill pattern. |
◆ getBrush()
| const Brush& CDPL::Vis::EllipsePrimitive2D::getBrush |
( |
| ) |
const |
Returns the brush defining the fill color and fill pattern.
- Returns
- The brush defining the fill color and fill pattern.
◆ setPosition()
| void CDPL::Vis::EllipsePrimitive2D::setPosition |
( |
const Math::Vector2D & |
pos | ) |
|
Sets the position of the ellipse center.
- Parameters
-
| pos | The center position of the ellipse. |
◆ getPosition()
| const Math::Vector2D& CDPL::Vis::EllipsePrimitive2D::getPosition |
( |
| ) |
const |
Returns the position of the ellipse center.
- Returns
- The center position of the ellipse.
◆ setWidth()
| void CDPL::Vis::EllipsePrimitive2D::setWidth |
( |
double |
width | ) |
|
Sets the diameter of the ellipse in x-direction.
- Parameters
-
| width | The width of the ellipse. |
◆ getWidth()
| double CDPL::Vis::EllipsePrimitive2D::getWidth |
( |
| ) |
const |
Returns the diameter of the ellipse in x-direction.
- Returns
- The width of the ellipse.
◆ setHeight()
| void CDPL::Vis::EllipsePrimitive2D::setHeight |
( |
double |
height | ) |
|
Sets the diameter of the ellipse in y-direction.
- Parameters
-
| height | The height of the ellipse. |
◆ getHeight()
| double CDPL::Vis::EllipsePrimitive2D::getHeight |
( |
| ) |
const |
Returns the diameter of the ellipse in y-direction.
- Returns
- The height of the ellipse.
◆ clone()
◆ getBounds()
The documentation for this class was generated from the following file: