|
Simple++
Powerfull and lightning fast C++ Library
|
#include <Gradient.h>
Public Member Functions | |
| GradientRadial (const Math::Vec2< float > ¢er=Math::Vec2< float >(0.5f), const Math::Vec2< float > &radius=Math::Vec2< float >(1.0f), const InterFunc &functor=InterFunc()) | |
| Create a new Radial Gradient. More... | |
| void | setCenter (const Math::Vec2< float > ¢er) |
| Set the center of the radial gradient (between 0 and 1) More... | |
| const Math::Vec2< float > & | getCenter () const |
| get the center of this gradient More... | |
| void | setRadius (const Math::Vec2< float > &radius) |
| set the radius More... | |
| const Math::Vec2< float > & | getRadius () const |
| get the radius of this gradient More... | |
| int | computeIndex (const Math::Vec2< float > &p, int maxIndex) const |
| Compute the index in the interpolated array. More... | |
Public Member Functions inherited from Graphic::Gradient< C, InterFunc > | |
| ~Gradient () | |
| destructor More... | |
| void | addPoint (float position, const C &color) |
| add a point to this gradient. More... | |
| Vector< GradientPoint< C > * >::Size | getNumPoints () const |
| get the number of points of this gradient. More... | |
| GradientPoint< C > & | operator[] (typename Vector< GradientPoint< C > * >::Size i) |
| Operator [] to direct access points inside this gradient. More... | |
| const GradientPoint< C > & | operator[] (typename Vector< GradientPoint< C > * >::Size i) const |
| Operator [] to direct access points inside this gradient. More... | |
| template<size_t N, typename InterFunc2 = InterFunc> | |
| void | computeInterpolation (C(&buffer)[N], const InterFunc2 &functor=InterFunc(), float begin=0.0f, float end=1.0f) const |
| Compute the interpolation of every color of this gradient in an 1D array. More... | |
| template<typename InterFunc2 = InterFunc> | |
| void | computeInterpolation (C *buffer, size_t size, const InterFunc2 &functor=InterFunc(), float begin=0.0f, float end=1.0f) const |
| Compute the interpolation of every color of this gradient in an 1D array. More... | |
| void | computeInterpolation (C *buffer, size_t size, float begin=0.0f, float end=1.0f) const |
| Compute the interpolation of every color of this gradient in an 1D array. More... | |
Static Public Member Functions | |
| static int | computeIndex (const Math::Vec2< float > &p, int maxIndex, const Math::Vec2< float > &radius) |
| Compute the index in the interpolated array. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Graphic::Gradient< C, InterFunc > | |
| Gradient (const InterFunc &functor=InterFunc()) | |
| Create a new gradient. More... | |
| Graphic::GradientRadial< C, InterFunc >::GradientRadial | ( | const Math::Vec2< float > & | center = Math::Vec2<float>( 0.5f ), |
| const Math::Vec2< float > & | radius = Math::Vec2<float>( 1.0f ), |
||
| const InterFunc & | functor = InterFunc() |
||
| ) |
Create a new Radial Gradient.
| center | Point of the center relatively of the surface applied (between 0 and 1) |
| radius | Radius horizontal and vertical relatively to the size of the surface applied (between 0 and 1) |
| functor | Functor used to interpolate the colors overloaded with : template<typename C> inline C operator()(const C & color1, const C & color2, float x) const; |
| int Graphic::GradientRadial< C, InterFunc >::computeIndex | ( | const Math::Vec2< float > & | p, |
| int | maxIndex | ||
| ) | const |
Compute the index in the interpolated array.
| p | Point relative of this gradient. |
| maxIndex | maximal value of an interpolation table index. |
|
static |
Compute the index in the interpolated array.
| p | Point relative of this gradient. |
| maxIndex | maximal value of an interpolation table index. |
| radius | Radius of the gradient (between 0.0 and 1.0) |
| const Math::Vec2< float > & Graphic::GradientRadial< C, InterFunc >::getCenter | ( | ) | const |
get the center of this gradient
| const Math::Vec2< float > & Graphic::GradientRadial< C, InterFunc >::getRadius | ( | ) | const |
get the radius of this gradient
| void Graphic::GradientRadial< C, InterFunc >::setCenter | ( | const Math::Vec2< float > & | center | ) |
Set the center of the radial gradient (between 0 and 1)
| center | Center of the radial gradient (between 0 and 1) |
| void Graphic::GradientRadial< C, InterFunc >::setRadius | ( | const Math::Vec2< float > & | radius | ) |
set the radius
| radius | Radius of this radial gradient relatively of the size of the surface (between 0 and 1) |
1.8.11