synfig-core
1.0.3
|
#include <gradient.h>
Public Types | |
typedef GradientCPoint | CPoint |
typedef vector< CPoint > | CPointList |
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 |
Gradient & | operator+= (const Gradient &rhs) |
Gradient & | operator-= (const Gradient &rhs) |
Gradient & | operator*= (const float &rhs) |
Gradient & | operator/= (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. |
typedef vector<CPoint> synfig::Gradient::CPointList |
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 |
|
inline |
|
inline |
Alias for sort (Implemented for consistency)
void synfig::Gradient::sort | ( | ) |
You should call this function after changing stuff.
Referenced by encode_gradient().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by synfig::ValueNode_Repeat_Gradient::operator()(), and reverse_value().
|
inline |
Referenced by synfig::ValueNode_Repeat_Gradient::operator()(), and reverse_value().
|
inline |
|
inline |
|
inline |
|
inline |
References begin(), synfig::GradientCPoint::color, end(), synfig::GradientCPoint::pos, and show_gradient().
Gradient & synfig::Gradient::operator*= | ( | const float & | rhs | ) |
Gradient & synfig::Gradient::operator/= | ( | const float & | rhs | ) |
|
inline |
|
inline |
As a future optimization, this could be performed faster using a binary search.
References synfig::error(), synfig::ColorAccumulator::get_a(), synfig::ColorAccumulator::get_b(), synfig::ColorAccumulator::get_g(), synfig::ColorAccumulator::get_r(), synfig::ColorAccumulator::is_valid(), isnan, synfig::Color::premult_alpha(), synfig::ColorAccumulator::set_b(), synfig::ColorAccumulator::set_g(), synfig::ColorAccumulator::set_r(), and supersample_helper().
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.