Linear gradients. More...
#include <lineargradient.h>
Classes | |
struct | Point |
struct | Vector |
Public Member Functions | |
PAPYRUS_RENDERABLE (LinearGradient) | |
virtual | ~LinearGradient () |
const Vector & | vector () const |
void | set_vector (const Vector &v) |
virtual void | render (Context &cairo) const |
Static Public Member Functions | |
static pointer | create (double x0, double y0, double x1, double y1, Quantity q=ABSOLUTE) |
static pointer | create (const Papyrus::Point &p0, const Papyrus::Point &p1, Quantity q=ABSOLUTE) |
static pointer | create (const Point &p0, const Point &p1) |
static pointer | create (const Vector &v) |
Protected Member Functions | |
LinearGradient (const Vector &v) | |
Protected Attributes | |
Vector | m_vector |
Linear gradients.
This is similar to the cairo linear gradient class. However, several items have been added to support SVG style gradients.
Papyrus::LinearGradient::~LinearGradient | ( | ) | [virtual] |
LinearGradient::pointer Papyrus::LinearGradient::create | ( | const Vector & | v | ) | [static] |
References LinearGradient().
LinearGradient::pointer Papyrus::LinearGradient::create | ( | const Point & | p0, | |
const Point & | p1 | |||
) | [static] |
References LinearGradient().
LinearGradient::pointer Papyrus::LinearGradient::create | ( | const Papyrus::Point & | p0, | |
const Papyrus::Point & | p1, | |||
Quantity | q = ABSOLUTE | |||
) | [static] |
References LinearGradient().
LinearGradient::pointer Papyrus::LinearGradient::create | ( | double | x0, | |
double | y0, | |||
double | x1, | |||
double | y1, | |||
Quantity | q = ABSOLUTE | |||
) | [static] |
References LinearGradient().
Referenced by render().
Papyrus::LinearGradient::PAPYRUS_RENDERABLE | ( | LinearGradient | ) |
void Papyrus::LinearGradient::render | ( | Context & | cairo | ) | const [virtual] |
Implements Papyrus::Renderable.
References create(), Papyrus::GRADIENT_SPREAD_NONE, Papyrus::GRADIENT_SPREAD_PAD, Papyrus::LinearGradient::Vector::has_percent(), Papyrus::Context::is_flag_set(), m_vector, Papyrus::PERCENT, Papyrus::RENDER_HINT_STROKE, Papyrus::Gradient::spread(), and Papyrus::Gradient::stops().
void Papyrus::LinearGradient::set_vector | ( | const Vector & | v | ) |
References Papyrus::Object::m_signal_changed, and m_vector.
const LinearGradient::Vector & Papyrus::LinearGradient::vector | ( | ) | const |
References m_vector.
Vector Papyrus::LinearGradient::m_vector [protected] |
Referenced by render(), set_vector(), and vector().