synfig-core  1.0.3
Public Types | Public Member Functions | List of all members
synfig::Gradient Class Reference

Color Gradient Class. More...

#include <gradient.h>

Public Types

typedef GradientCPoint CPoint
typedef vector< CPointCPointList
typedef CPointList::const_iterator const_iterator
typedef CPointList::iterator iterator
typedef
CPointList::const_reverse_iterator 
const_reverse_iterator
typedef
CPointList::reverse_iterator 
reverse_iterator

Public Member Functions

 Gradient ()
 Gradient (const Color &c1, const Color &c2)
 Two-Tone Color Gradient Convenience Constructor.
 Gradient (const Color &c1, const Color &c2, const Color &c3)
 Three-Tone Color Gradient Convenience Constructor.
void sync ()
 Alias for sort (Implemented for consistency)
void sort ()
 You should call this function after changing stuff.
void push_back (const CPoint cpoint)
iterator erase (iterator iter)
bool empty () const
size_t size () const
iterator begin ()
iterator end ()
reverse_iterator rbegin ()
reverse_iterator rend ()
const_iterator begin () const
const_iterator end () const
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
Gradientoperator+= (const Gradient &rhs)
Gradientoperator-= (const Gradient &rhs)
Gradientoperator*= (const float &rhs)
Gradientoperator/= (const float &rhs)
Gradient operator+ (const Gradient &rhs) const
Gradient operator- (const Gradient &rhs) const
Gradient operator* (const float &rhs) const
Gradient operator/ (const float &rhs) const
Color operator() (const Real &x, float supersample=0) const
Real mag () const
iterator proximity (const Real &x)
 Returns the iterator of the CPoint closest to x.
const_iterator proximity (const Real &x) const
 Returns the const_iterator of the CPoint closest to x.
iterator find (const UniqueID &id)
 Returns the iterator of the CPoint with UniqueID id.
const_iterator find (const UniqueID &id) const
 Returns the const_iterator of the CPoint with UniqueID id.

Detailed Description

Color Gradient Class.

Member Typedef Documentation

typedef CPointList::const_iterator synfig::Gradient::const_iterator
typedef CPointList::iterator synfig::Gradient::iterator
typedef CPointList::const_reverse_iterator synfig::Gradient::const_reverse_iterator
typedef CPointList::reverse_iterator synfig::Gradient::reverse_iterator

Constructor & Destructor Documentation

synfig::Gradient::Gradient ( )
inline
synfig::Gradient::Gradient ( const Color c1,
const Color c2 
)

Two-Tone Color Gradient Convenience Constructor.

synfig::Gradient::Gradient ( const Color c1,
const Color c2,
const Color c3 
)

Three-Tone Color Gradient Convenience Constructor.

Member Function Documentation

void synfig::Gradient::sync ( )
inline

Alias for sort (Implemented for consistency)

void synfig::Gradient::sort ( )

You should call this function after changing stuff.

Referenced by encode_gradient().

void synfig::Gradient::push_back ( const CPoint  cpoint)
inline
iterator synfig::Gradient::erase ( iterator  iter)
inline
bool synfig::Gradient::empty ( ) const
inline
size_t synfig::Gradient::size ( ) const
inline
iterator synfig::Gradient::begin ( )
inline
iterator synfig::Gradient::end ( )
inline
reverse_iterator synfig::Gradient::rbegin ( )
inline
reverse_iterator synfig::Gradient::rend ( )
inline
const_iterator synfig::Gradient::begin ( ) const
inline
const_iterator synfig::Gradient::end ( ) const
inline
const_reverse_iterator synfig::Gradient::rbegin ( ) const
inline
const_reverse_iterator synfig::Gradient::rend ( ) const
inline
Gradient & synfig::Gradient::operator+= ( const Gradient rhs)
Gradient & synfig::Gradient::operator-= ( const Gradient rhs)
Gradient & synfig::Gradient::operator*= ( const float &  rhs)
Gradient & synfig::Gradient::operator/= ( const float &  rhs)
Gradient synfig::Gradient::operator+ ( const Gradient rhs) const
inline
Gradient synfig::Gradient::operator- ( const Gradient rhs) const
inline
Gradient synfig::Gradient::operator* ( const float &  rhs) const
inline
Gradient synfig::Gradient::operator/ ( const float &  rhs) const
inline
Color synfig::Gradient::operator() ( const Real x,
float  supersample = 0 
) const
Real synfig::Gradient::mag ( ) const
synfig::Gradient::iterator synfig::Gradient::proximity ( const Real x)

Returns the iterator of the CPoint closest to x.

References std::abs().

synfig::Gradient::const_iterator synfig::Gradient::proximity ( const Real x) const

Returns the const_iterator of the CPoint closest to x.

synfig::Gradient::iterator synfig::Gradient::find ( const UniqueID id)

Returns the iterator of the CPoint with UniqueID id.

synfig::Gradient::const_iterator synfig::Gradient::find ( const UniqueID id) const

Returns the const_iterator of the CPoint with UniqueID id.


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