sftools  2.0 dev
Bunch of tools for SFML application development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | Public Attributes | List of all members
sftools::Frame Class Reference

Hold the data required to render a frame. More...

#include <Frame.hpp>

+ Collaboration diagram for sftools::Frame:

Public Member Functions

 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.
 

Public Attributes

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
 

Detailed Description

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.

Constructor & Destructor Documentation

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
sizethe size of the frame
colorthe 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
texturethe texture of the frame
areathe subrect of the texture that should be displayed
colorthe color of the frame, usually the default value, i.e. white

Definition at line 85 of file Frame.hpp.

Member Data Documentation

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: