Simple++
Powerfull and lightning fast C++ Library
Public Member Functions | List of all members
Graphic::GradientPoint< C > Class Template Reference

A point in a gradient C Type for one color. More...

#include <Gradient.h>

Public Member Functions

 GradientPoint (float position, const C &color)
 Create a Point for a Gradient initialized with a position and a color. More...
 
void setPosition (float position)
 set the position of this point. More...
 
float getPosition () const
 get the Position of this point More...
 
void setColor (const C &color)
 set the color of this point More...
 
const C & getColor () const
 get the color of this point More...
 

Detailed Description

template<typename C = ColorRGBA<unsigned char>>
class Graphic::GradientPoint< C >

A point in a gradient C Type for one color.

Constructor & Destructor Documentation

template<typename C >
Graphic::GradientPoint< C >::GradientPoint ( float  position,
const C &  color 
)

Create a Point for a Gradient initialized with a position and a color.

Parameters
positionFloating number between 0 and 1 representing the position on the gradient.
colorColor of this point.

Member Function Documentation

template<typename C >
const C & Graphic::GradientPoint< C >::getColor ( ) const

get the color of this point

Returns
Color
template<typename C >
float Graphic::GradientPoint< C >::getPosition ( ) const

get the Position of this point

Returns
The position of this point (value between 0.0 and 1.0)
template<typename C >
void Graphic::GradientPoint< C >::setColor ( const C &  color)

set the color of this point

Parameters
colornew color.
template<typename C >
void Graphic::GradientPoint< C >::setPosition ( float  position)

set the position of this point.

Parameters
positionnew position.

The documentation for this class was generated from the following files: