Hold the data required to render a frame.
More...
#include <Frame.hpp>
|
| Frame (sf::Vector2i size=sf::Vector2i(0, 0), sf::Color color=sf::Color::White) |
| Constructor.
|
|
| Frame (sf::Texture const &texture, sf::IntRect area, sf::Color color=sf::Color::White) |
| Constructor.
|
|
|
sf::Texture const * | texture |
| the texture of the frame
|
|
sf::IntRect | area |
| the area of the texture to be rendered
|
|
sf::Color | color |
| the color of the frame
|
|
Hold the data required to render a frame.
- Note
- Like sf::Sprite, Frame doesn't own the texture. You have to keep it 'alive' for the lifetime of the frame that uses it, otherwise you'll get some undefined behaviour.
- See Also
- FrameStream
-
Animation
Definition at line 57 of file Frame.hpp.
sftools::Frame::Frame |
( |
sf::Vector2i |
size = sf::Vector2i(0, 0) , |
|
|
sf::Color |
color = sf::Color::White |
|
) |
| |
|
inline |
Constructor.
This constructor can be used as the default one, or as a way to define a frame without any texture (i.e. a uniformly colored rectangle).
- Parameters
-
size | the size of the frame |
color | the color of the frame |
Definition at line 68 of file Frame.hpp.
sftools::Frame::Frame |
( |
sf::Texture const & |
texture, |
|
|
sf::IntRect |
area, |
|
|
sf::Color |
color = sf::Color::White |
|
) |
| |
|
inline |
Constructor.
This constructor can be used to create a frame with a texture.
- Parameters
-
texture | the texture of the frame |
area | the subrect of the texture that should be displayed |
color | the color of the frame, usually the default value, i.e. white |
Definition at line 85 of file Frame.hpp.
sf::IntRect sftools::Frame::area |
the area of the texture to be rendered
Definition at line 94 of file Frame.hpp.
sf::Color sftools::Frame::color |
the color of the frame
Definition at line 95 of file Frame.hpp.
sf::Texture const* sftools::Frame::texture |
the texture of the frame
Definition at line 93 of file Frame.hpp.
The documentation for this class was generated from the following file: