#include <stroke.h>
Public Member Functions | |
PAPYRUS_RENDERABLE (Stroke) | |
virtual | ~Stroke () |
Stroke & | operator= (const Stroke &other) |
bool | operator== (const Stroke &other) const |
bool | operator!= (const Stroke &other) const |
const std::valarray< double > & | dash_array () |
double | dash_offset () |
void | set_dash (const std::valarray< double > dashes=std::valarray< double >(), double offset=0.0) |
Cairo::LineCap | cap () |
void | set_cap (Cairo::LineCap cap=Cairo::LINE_CAP_BUTT) |
void | set_cap (const Glib::ustring &c) |
Sets the cap according to the string value. | |
Cairo::LineJoin | join () |
void | set_join (Cairo::LineJoin join=Cairo::LINE_JOIN_MITER) |
void | set_join (const Glib::ustring &c) |
Sets the join according to the string value. | |
double | width () |
void | set_width (double width=1.0) |
double | miter_limit () |
void | set_miter_limit (double limit=INFINITY) |
Paint::pointer | paint () |
void | set_paint (Paint::pointer paint=Paint::pointer()) |
virtual void | render (Context &cairo) const |
sigc::signal< void > | signal_paint_changed () |
sigc::signal< void > | signal_width_changed () |
sigc::signal< void > | signal_cap_changed () |
sigc::signal< void > | signal_join_changed () |
sigc::signal< void > | signal_miter_limit_changed () |
sigc::signal< void > | signal_dash_changed () |
Static Public Member Functions | |
static pointer | create (Paint::pointer paint=Paint::pointer(), double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER) |
static pointer | create (double width, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER) |
static pointer | create (Cairo::RefPtr< Cairo::Pattern > pattern, double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER) |
static pointer | create (const RGBA &rgba, double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER) |
static pointer | create (const Glib::ustring &color, double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER) |
Protected Member Functions | |
Stroke (double width, Cairo::LineCap cap, Cairo::LineJoin join) | |
Stroke (Paint::pointer paint, double width, Cairo::LineCap cap, Cairo::LineJoin join) | |
void | on_paint_changed () |
Protected Attributes | |
Paint::pointer | m_paint |
double | m_width |
Cairo::LineCap | m_cap |
Cairo::LineJoin | m_join |
double | m_miter_limit |
std::valarray< double > | m_dash_array |
double | m_dash_offset |
sigc::signal< void > | m_signal_paint_changed |
sigc::signal< void > | m_signal_width_changed |
sigc::signal< void > | m_signal_cap_changed |
sigc::signal< void > | m_signal_join_changed |
sigc::signal< void > | m_signal_miter_limit_changed |
sigc::signal< void > | m_signal_dash_changed |
sigc::connection | m_paint_changed_connection |
Papyrus::Stroke::Stroke | ( | double | width, | |
Cairo::LineCap | cap, | |||
Cairo::LineJoin | join | |||
) | [protected] |
Referenced by create().
Papyrus::Stroke::Stroke | ( | Paint::pointer | paint, | |
double | width, | |||
Cairo::LineCap | cap, | |||
Cairo::LineJoin | join | |||
) | [protected] |
References m_paint, m_paint_changed_connection, and on_paint_changed().
Papyrus::Stroke::~Stroke | ( | ) | [virtual] |
Cairo::LineCap Papyrus::Stroke::cap | ( | ) |
References m_cap.
Stroke::pointer Papyrus::Stroke::create | ( | const Glib::ustring & | color, | |
double | width = 1.0 , |
|||
Cairo::LineCap | cap = Cairo::LINE_CAP_BUTT , |
|||
Cairo::LineJoin | join = Cairo::LINE_JOIN_MITER | |||
) | [static] |
References Papyrus::strcaseeq(), and Stroke().
Stroke::pointer Papyrus::Stroke::create | ( | const RGBA & | rgba, | |
double | width = 1.0 , |
|||
Cairo::LineCap | cap = Cairo::LINE_CAP_BUTT , |
|||
Cairo::LineJoin | join = Cairo::LINE_JOIN_MITER | |||
) | [static] |
References Papyrus::Color::create().
Stroke::pointer Papyrus::Stroke::create | ( | Cairo::RefPtr< Cairo::Pattern > | pattern, | |
double | width = 1.0 , |
|||
Cairo::LineCap | cap = Cairo::LINE_CAP_BUTT , |
|||
Cairo::LineJoin | join = Cairo::LINE_JOIN_MITER | |||
) | [static] |
References Papyrus::Color::create().
Stroke::pointer Papyrus::Stroke::create | ( | double | width, | |
Cairo::LineCap | cap = Cairo::LINE_CAP_BUTT , |
|||
Cairo::LineJoin | join = Cairo::LINE_JOIN_MITER | |||
) | [static] |
Stroke::pointer Papyrus::Stroke::create | ( | Paint::pointer | paint = Paint::pointer() , |
|
double | width = 1.0 , |
|||
Cairo::LineCap | cap = Cairo::LINE_CAP_BUTT , |
|||
Cairo::LineJoin | join = Cairo::LINE_JOIN_MITER | |||
) | [static] |
Referenced by Papyrus::Handlebox::Handlebox(), Papyrus::Gtk::LineWidthComboBox::load_pixbufs(), Papyrus::Marker::Marker(), Papyrus::RGBA::operator Stroke::pointer(), Papyrus::Shape::set(), Papyrus::Group::set(), Papyrus::Tiling::set_stroke(), Papyrus::Shape::set_stroke(), Papyrus::Group::set_stroke(), Papyrus::Tiling::set_stroke_paint(), Papyrus::Shape::set_stroke_paint(), and Papyrus::Gtk::MarkerWidget::set_use_preview().
const std::valarray< double > & Papyrus::Stroke::dash_array | ( | ) |
References m_dash_array.
Referenced by render().
double Papyrus::Stroke::dash_offset | ( | ) |
References m_dash_offset.
Cairo::LineJoin Papyrus::Stroke::join | ( | ) |
References m_join.
double Papyrus::Stroke::miter_limit | ( | ) |
References m_miter_limit.
void Papyrus::Stroke::on_paint_changed | ( | ) | [protected] |
References Papyrus::Object::m_signal_changed, and m_signal_paint_changed.
Referenced by operator=(), set_paint(), and Stroke().
bool Papyrus::Stroke::operator!= | ( | const Stroke & | other | ) | const |
References operator==().
References m_cap, m_dash_array, m_dash_offset, m_join, m_miter_limit, m_paint, m_paint_changed_connection, m_signal_cap_changed, Papyrus::Object::m_signal_changed, m_signal_dash_changed, m_signal_join_changed, m_signal_miter_limit_changed, m_signal_paint_changed, m_signal_width_changed, m_width, and on_paint_changed().
bool Papyrus::Stroke::operator== | ( | const Stroke & | other | ) | const |
References m_cap, m_dash_offset, m_join, m_miter_limit, m_paint, and m_width.
Referenced by operator!=().
Paint::pointer Papyrus::Stroke::paint | ( | ) |
References m_paint.
Papyrus::Stroke::PAPYRUS_RENDERABLE | ( | Stroke | ) |
void Papyrus::Stroke::render | ( | Context & | cairo | ) | const [virtual] |
Implements Papyrus::Renderable.
References dash_array(), m_cap, m_dash_array, m_dash_offset, m_join, m_miter_limit, m_paint, m_width, Papyrus::RENDER_HINT_STROKE, and Papyrus::Context::set_flag().
void Papyrus::Stroke::set_cap | ( | const Glib::ustring & | c | ) |
void Papyrus::Stroke::set_cap | ( | Cairo::LineCap | cap = Cairo::LINE_CAP_BUTT |
) |
References m_cap, m_signal_cap_changed, and Papyrus::Object::m_signal_changed.
Referenced by set_cap().
void Papyrus::Stroke::set_dash | ( | const std::valarray< double > | dashes = std::valarray<double>() , |
|
double | offset = 0.0 | |||
) |
References m_dash_array, m_dash_offset, Papyrus::Object::m_signal_changed, and m_signal_dash_changed.
void Papyrus::Stroke::set_join | ( | const Glib::ustring & | c | ) |
Sets the join according to the string value.
Values are case independent and are the same as SVG: miter , round or bevel .
References set_join().
void Papyrus::Stroke::set_join | ( | Cairo::LineJoin | join = Cairo::LINE_JOIN_MITER |
) |
References m_join, Papyrus::Object::m_signal_changed, and m_signal_join_changed.
Referenced by set_join().
void Papyrus::Stroke::set_miter_limit | ( | double | limit = INFINITY |
) |
References m_miter_limit, Papyrus::Object::m_signal_changed, and m_signal_miter_limit_changed.
void Papyrus::Stroke::set_paint | ( | Paint::pointer | paint = Paint::pointer() |
) |
void Papyrus::Stroke::set_width | ( | double | width = 1.0 |
) |
References Papyrus::Object::m_signal_changed, m_signal_width_changed, and m_width.
sigc::signal< void > Papyrus::Stroke::signal_cap_changed | ( | ) |
References m_signal_cap_changed.
sigc::signal< void > Papyrus::Stroke::signal_dash_changed | ( | ) |
References m_signal_dash_changed.
sigc::signal< void > Papyrus::Stroke::signal_join_changed | ( | ) |
References m_signal_join_changed.
sigc::signal< void > Papyrus::Stroke::signal_miter_limit_changed | ( | ) |
References m_signal_miter_limit_changed.
sigc::signal< void > Papyrus::Stroke::signal_paint_changed | ( | ) |
References m_signal_paint_changed.
sigc::signal< void > Papyrus::Stroke::signal_width_changed | ( | ) |
References m_signal_width_changed.
double Papyrus::Stroke::width | ( | ) |
References m_width.
Cairo::LineCap Papyrus::Stroke::m_cap [protected] |
Referenced by cap(), operator=(), operator==(), render(), and set_cap().
std::valarray<double> Papyrus::Stroke::m_dash_array [protected] |
Referenced by dash_array(), operator=(), render(), and set_dash().
double Papyrus::Stroke::m_dash_offset [protected] |
Referenced by dash_offset(), operator=(), operator==(), render(), and set_dash().
Cairo::LineJoin Papyrus::Stroke::m_join [protected] |
Referenced by join(), operator=(), operator==(), render(), and set_join().
double Papyrus::Stroke::m_miter_limit [protected] |
Referenced by miter_limit(), operator=(), operator==(), render(), and set_miter_limit().
Paint::pointer Papyrus::Stroke::m_paint [protected] |
Referenced by operator=(), operator==(), paint(), render(), set_paint(), and Stroke().
sigc::connection Papyrus::Stroke::m_paint_changed_connection [protected] |
Referenced by operator=(), set_paint(), and Stroke().
sigc::signal<void> Papyrus::Stroke::m_signal_cap_changed [protected] |
Referenced by operator=(), set_cap(), and signal_cap_changed().
sigc::signal<void> Papyrus::Stroke::m_signal_dash_changed [protected] |
Referenced by operator=(), set_dash(), and signal_dash_changed().
sigc::signal<void> Papyrus::Stroke::m_signal_join_changed [protected] |
Referenced by operator=(), set_join(), and signal_join_changed().
sigc::signal<void> Papyrus::Stroke::m_signal_miter_limit_changed [protected] |
Referenced by operator=(), set_miter_limit(), and signal_miter_limit_changed().
sigc::signal<void> Papyrus::Stroke::m_signal_paint_changed [protected] |
Referenced by on_paint_changed(), operator=(), set_paint(), and signal_paint_changed().
sigc::signal<void> Papyrus::Stroke::m_signal_width_changed [protected] |
Referenced by operator=(), set_width(), and signal_width_changed().
double Papyrus::Stroke::m_width [protected] |
Referenced by operator=(), operator==(), render(), set_width(), and width().