Base class for linear and radial gradients (LinearGradient and RadialGradient). More...
#include <gradient.h>
Classes | |
class | Stop |
A gradient stop for use with LinearGradient or RadialGradient. More... | |
Public Types | |
typedef PapyrusPointer< Gradient > | pointer |
typedef std::vector< Stop > | Stops |
Public Member Functions | |
~Gradient () | |
GradientUnits | units () const |
void | set_units (GradientUnits gu) |
GradientSpread | spread () const |
void | set_spread (GradientSpread s) |
const Matrix & | transform () const |
Matrix & | transform () |
void | set_transform (const Matrix &m) |
Gradient::pointer | parent () |
void | set_parent (Gradient::pointer p) |
const Stops & | stops () const |
void | push_front (const Stop &s) |
void | push_back (const Stop &s) |
void | insert (Stops::iterator pos, const Stop &s) |
void | remove (Stops::iterator pos) |
void | clear_stops () |
Protected Member Functions | |
Gradient () | |
void | on_parent_changed () |
void | on_transform_changed () |
Protected Attributes | |
GradientUnits | m_units |
GradientSpread | m_spread |
Matrix | m_transform |
Gradient::pointer | m_parent |
sigc::connection | m_parent_changed_connection |
Stops | m_stops |
Base class for linear and radial gradients (LinearGradient and RadialGradient).
This is similar to the cairo linear and radial gradient base class. However, several items have been added to support SVG style gradients.
typedef PapyrusPointer<Gradient> Papyrus::Gradient::pointer |
Reimplemented from Papyrus::Paint.
typedef std::vector<Stop> Papyrus::Gradient::Stops |
Papyrus::Gradient::Gradient | ( | ) | [protected] |
References m_transform, on_transform_changed(), and Papyrus::Matrix::signal_changed().
Papyrus::Gradient::~Gradient | ( | ) |
void Papyrus::Gradient::clear_stops | ( | ) |
References Papyrus::Object::m_signal_changed, and m_stops.
void Papyrus::Gradient::insert | ( | Stops::iterator | pos, | |
const Stop & | s | |||
) |
References Papyrus::Object::m_signal_changed, and m_stops.
void Papyrus::Gradient::on_parent_changed | ( | ) | [protected] |
References Papyrus::Object::m_signal_changed.
Referenced by set_parent().
void Papyrus::Gradient::on_transform_changed | ( | ) | [protected] |
References Papyrus::Object::m_signal_changed.
Referenced by Gradient().
Gradient::pointer Papyrus::Gradient::parent | ( | ) |
References m_parent.
void Papyrus::Gradient::push_back | ( | const Stop & | s | ) |
References Papyrus::Object::m_signal_changed, and m_stops.
void Papyrus::Gradient::push_front | ( | const Stop & | s | ) |
References Papyrus::Object::m_signal_changed, and m_stops.
void Papyrus::Gradient::remove | ( | Stops::iterator | pos | ) |
References Papyrus::Object::m_signal_changed, and m_stops.
void Papyrus::Gradient::set_parent | ( | Gradient::pointer | p | ) |
References m_parent, m_parent_changed_connection, Papyrus::Object::m_signal_changed, and on_parent_changed().
void Papyrus::Gradient::set_spread | ( | GradientSpread | s | ) |
References Papyrus::Object::m_signal_changed, and m_spread.
void Papyrus::Gradient::set_transform | ( | const Matrix & | m | ) |
References m_transform.
void Papyrus::Gradient::set_units | ( | GradientUnits | gu | ) |
References Papyrus::Object::m_signal_changed, and m_units.
GradientSpread Papyrus::Gradient::spread | ( | ) | const |
References Papyrus::GRADIENT_SPREAD_NONE, m_parent, and m_spread.
Referenced by Papyrus::RadialGradient::render(), and Papyrus::LinearGradient::render().
const Gradient::Stops & Papyrus::Gradient::stops | ( | ) | const |
References m_parent, and m_stops.
Referenced by Papyrus::RadialGradient::render(), and Papyrus::LinearGradient::render().
Matrix & Papyrus::Gradient::transform | ( | ) |
References m_transform.
const Matrix & Papyrus::Gradient::transform | ( | ) | const |
References m_transform.
GradientUnits Papyrus::Gradient::units | ( | ) | const |
References Papyrus::GRADIENT_UNITS_NONE, m_parent, and m_units.
Gradient::pointer Papyrus::Gradient::m_parent [protected] |
Referenced by parent(), set_parent(), spread(), stops(), and units().
sigc::connection Papyrus::Gradient::m_parent_changed_connection [protected] |
Referenced by set_parent().
GradientSpread Papyrus::Gradient::m_spread [protected] |
Referenced by set_spread(), and spread().
Stops Papyrus::Gradient::m_stops [protected] |
Referenced by clear_stops(), insert(), push_back(), push_front(), remove(), and stops().
Matrix Papyrus::Gradient::m_transform [protected] |
Referenced by Gradient(), set_transform(), and transform().
GradientUnits Papyrus::Gradient::m_units [protected] |
Referenced by set_units(), and units().