Drawable representing a mathematical curve.
More...
#include <Curve.hpp>
|
| Curve (CurveInfo info, sf::Color color=sf::Color::Black, float thickness=1.f) |
| Construct a curve.
|
|
virtual | ~Curve () |
| Virtual destructor.
|
|
sf::FloatRect | getLocalBounds () const |
| Get the local bounding rectangle of the entity.
|
|
sf::FloatRect | getGlobalBounds () const |
| Get the global bounding rectangle of the entity.
|
|
CurveInfo const & | getInfo () const |
| Get the curve's info.
|
|
void | setInfo (CurveInfo const &info) |
| Set the curve's info.
|
|
sf::Color | getColor () const |
| Get the curve's color.
|
|
void | setColor (sf::Color color) |
| Set the curve's color.
|
|
float | getThickness () const |
| Get the curve's thickness.
|
|
void | setThickness (float thickness) |
| Set the curve's thickness.
|
|
|
virtual void | draw (sf::RenderTarget &target, sf::RenderStates states) const |
| Draw the curve to a render target.
|
|
Drawable representing a mathematical curve.
You can draw partial circle, ellipse, sine, etc... curves with this class. Here is an example :
- See Also
- CurveInfo
Definition at line 159 of file Curve.hpp.
sftools::Curve::Curve |
( |
CurveInfo |
info, |
|
|
sf::Color |
color = sf::Color::Black , |
|
|
float |
thickness = 1.f |
|
) |
| |
|
inline |
Construct a curve.
- Parameters
-
info | curve's info |
color | curve's color |
thickness | curve's thickness |
Definition at line 170 of file Curve.hpp.
virtual sftools::Curve::~Curve |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor.
Definition at line 182 of file Curve.hpp.
virtual void sftools::Curve::draw |
( |
sf::RenderTarget & |
target, |
|
|
sf::RenderStates |
states |
|
) |
| const |
|
inlineprotectedvirtual |
Draw the curve to a render target.
- Parameters
-
target | Render target to draw to |
states | Current render states |
Definition at line 289 of file Curve.hpp.
sf::Color sftools::Curve::getColor |
( |
| ) |
const |
|
inline |
Get the curve's color.
- Returns
- curve's color
Definition at line 245 of file Curve.hpp.
sf::FloatRect sftools::Curve::getGlobalBounds |
( |
| ) |
const |
|
inline |
Get the global bounding rectangle of the entity.
The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.
- Returns
- Global bounding rectangle of the entity
Definition at line 214 of file Curve.hpp.
References getLocalBounds().
CurveInfo const& sftools::Curve::getInfo |
( |
| ) |
const |
|
inline |
Get the curve's info.
- Returns
- the curve's info
Definition at line 224 of file Curve.hpp.
sf::FloatRect sftools::Curve::getLocalBounds |
( |
| ) |
const |
|
inline |
Get the local bounding rectangle of the entity.
The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.
- Returns
- Local bounding rectangle of the entity
Definition at line 198 of file Curve.hpp.
Referenced by getGlobalBounds().
float sftools::Curve::getThickness |
( |
| ) |
const |
|
inline |
Get the curve's thickness.
- Returns
- curve's thickness
Definition at line 266 of file Curve.hpp.
void sftools::Curve::setColor |
( |
sf::Color |
color | ) |
|
|
inline |
Set the curve's color.
- Parameters
-
Definition at line 255 of file Curve.hpp.
void sftools::Curve::setInfo |
( |
CurveInfo const & |
info | ) |
|
|
inline |
Set the curve's info.
- Returns
- info new curve's info
Definition at line 234 of file Curve.hpp.
void sftools::Curve::setThickness |
( |
float |
thickness | ) |
|
|
inline |
Set the curve's thickness.
- Parameters
-
thickness | new curve's thickness |
Definition at line 276 of file Curve.hpp.
The documentation for this class was generated from the following file: