Classes | Functions
Graphics

Miscellaneous graphics-related functionality, such as specialized sprites or color helpers. More...

Classes

class  thor::BigSprite
 Sprite using big textures. More...
 
class  thor::BigTexture
 Class for textures which are too big for sf::Texture. More...
 
class  thor::ColorGradient
 Class to implement color gradients. More...
 
class  thor::StringConversionException
 Exception class for failed string conversions. More...
 

Functions

std::string thor::toString (const sf::Color &color)
 Returns a std::string representation of sf::Color. More...
 
template<typename T >
std::string thor::toString (const sf::Vector2< T > &vector)
 Returns a std::string representation of sf::Vector2<T>. More...
 
template<typename T >
std::string thor::toString (const sf::Vector3< T > &vector)
 Returns a std::string representation of sf::Vector3<T>. More...
 
template<typename T >
std::string thor::toString (const sf::Rect< T > &rect)
 Returns a std::string representation of sf::Rect<T>. More...
 
template<typename T >
std::string thor::toString (const PolarVector2< T > &vector)
 Returns the string representation of thor::PolarVector<T>. More...
 
template<typename T >
void thor::setColor (T &object, const sf::Color &color)
 Sets the color of a graphical object.
 
void thor::setColor (Particle &particle, const sf::Color &color)
 Sets the color of a particle.
 
template<typename T >
void thor::setAlpha (T &object, sf::Uint8 alpha)
 Sets the alpha color value of a graphical object. More...
 
void thor::setAlpha (Particle &particle, sf::Uint8 alpha)
 Sets the alpha color value of a particle.
 
sf::Color blendColors (const sf::Color &firstColor, const sf::Color &secondColor, float interpolation)
 Blends the colors firstColor and secondColor, according to the given interpolation. More...
 

Detailed Description

Miscellaneous graphics-related functionality, such as specialized sprites or color helpers.

Function Documentation

sf::Color blendColors ( const sf::Color &  firstColor,
const sf::Color &  secondColor,
float  interpolation 
)
related

Blends the colors firstColor and secondColor, according to the given interpolation.

Parameters
firstColorThe first color to blend.
secondColorThe second color to blend.
interpolationSpecifies how much of every color is taken. If it has value 0, the first color is returned; with value 1, the second color is returned. Every value in ]0,1[ leads to a mixture. Other values are not allowed.
template<typename T >
void thor::setAlpha ( T &  object,
sf::Uint8  alpha 
)

Sets the alpha color value of a graphical object.

The object shall support the methods getColor() and setColor().

std::string thor::toString ( const sf::Color &  color)

Returns a std::string representation of sf::Color.

Format: (r,g,b,a)

template<typename T >
std::string thor::toString ( const sf::Vector2< T > &  vector)

Returns a std::string representation of sf::Vector2<T>.

Format: (x,y)

template<typename T >
std::string thor::toString ( const sf::Vector3< T > &  vector)

Returns a std::string representation of sf::Vector3<T>.

Format: (x,y,z)

template<typename T >
std::string thor::toString ( const sf::Rect< T > &  rect)

Returns a std::string representation of sf::Rect<T>.

Format: (left,top;width,height)

template<typename T >
std::string thor::toString ( const PolarVector2< T > &  vector)

Returns the string representation of thor::PolarVector<T>.

Format: (r,phi°) - ° represents the degree symbol (small circle)