#include <tiling.h>
Public Member Functions | |
PAPYRUS_RENDERABLE (Tiling) | |
virtual | ~Tiling () |
unsigned | rows () const |
void | set_rows (unsigned r) |
unsigned | columns () const |
void | set_columns (unsigned c) |
void | set_columns_rows (unsigned c, unsigned r) |
Sets the number of columns and rows in the quadrille. | |
double | side_length () const |
void | set_side_length (double l) |
Fill::pointer | fill (unsigned column, unsigned row) |
The pattern that will be used to fill the cell at the given position. | |
void | set_fill (Fill::pointer fill, unsigned column, unsigned row) |
Sets the pattern that will be used to fill the cell at the given position. | |
void | set_fill (Paint::pointer paint, unsigned column, unsigned row) |
Creates a new Fill object for the paint and replaces the current cell fill with the new fill object. | |
void | set_fill (Cairo::RefPtr< Cairo::Pattern > pattern, unsigned column, unsigned row) |
Creates a new Fill object for the pattern and replaces the current cell fill with the new fill object. | |
void | set_fill (const RGBA &color, unsigned column, unsigned row) |
Creates a new Fill object for the color and replaces the current cell fill with the new fill object. | |
void | set_fill (const Glib::ustring &fill, unsigned column, unsigned row) |
Creates a new Fill object for the color and replaces the current cell fill with the new fill object. | |
void | set_fill_paint (const Glib::ustring &paint_name, unsigned column, unsigned row) |
Sets only the fill paint (not other fill characteristics) to the named paint. | |
Fill::pointer | fill () |
The pattern that will be used to fill this shape. | |
void | set_fill (Fill::pointer fill) |
Sets the pattern that will be used to fill this shape. | |
void | set_fill (Paint::pointer paint) |
Creates a new Fill object for the paint and replaces the current fill with the new fill object. | |
void | set_fill (Cairo::RefPtr< Cairo::Pattern > pattern) |
Creates a new Fill object for the pattern and replaces the current fill with the new fill object. | |
void | set_fill (const RGBA &color) |
Creates a new Fill object for the color and replaces the current fill with the new fill object. | |
void | set_fill (const Glib::ustring &fill) |
Creates a new Fill object for the color and replaces the current fill with the new fill object. | |
void | set_fill_paint (const Glib::ustring &paint_name) |
Sets only the fill paint (not other fill characteristics) to the named paint. | |
Stroke::pointer | stroke () |
The Stroke that will be used to draw the stroke. | |
void | set_stroke (Stroke::pointer stroke) |
Sets the stroke style that will be used to stroke all cells of the quadrille. | |
void | set_stroke (Paint::pointer paint) |
Creates a new Stroke object for the paint and replaces the current stroke with the new stroke object. | |
void | set_stroke (Cairo::RefPtr< Cairo::Pattern > pattern) |
Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object. | |
void | set_stroke (const RGBA &color) |
Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object. | |
void | set_stroke (const Glib::ustring &stroke) |
Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object. | |
void | set_stroke_paint (const Glib::ustring &paint_name) |
Sets only the stroke paint (not other stroke characteristics) to the named paint. | |
Protected Member Functions | |
Tiling (const Glib::ustring &id, unsigned rows, unsigned columns, double side_length) | |
virtual void | on_default_fill_changed () |
virtual void | on_fill_changed (unsigned column, unsigned row) |
virtual void | on_stroke_changed () |
virtual void | shape_changed () |
virtual void | update_centroid_x ()=0 |
virtual void | update_centroid_y ()=0 |
virtual void | update_centroid ()=0 |
Protected Attributes | |
unsigned | m_rows |
unsigned | m_columns |
double | m_side_length |
Fill::pointer ** | m_fill |
sigc::connection ** | m_fill_changed_connection |
Fill::pointer | m_default_fill |
Stroke::pointer | m_stroke |
sigc::connection | m_default_fill_changed_connection |
sigc::connection | m_stroke_changed_connection |
Papyrus::Tiling::Tiling | ( | const Glib::ustring & | id, | |
unsigned | rows, | |||
unsigned | columns, | |||
double | side_length | |||
) | [protected] |
References m_columns, m_fill, m_fill_changed_connection, and m_rows.
Papyrus::Tiling::~Tiling | ( | ) | [virtual] |
References m_columns, m_fill, m_fill_changed_connection, and m_rows.
unsigned Papyrus::Tiling::columns | ( | ) | const |
References m_columns.
Fill::pointer Papyrus::Tiling::fill | ( | ) |
The pattern that will be used to fill this shape.
References m_default_fill.
Referenced by set_fill_paint().
Fill::pointer Papyrus::Tiling::fill | ( | unsigned | column, | |
unsigned | row | |||
) |
void Papyrus::Tiling::on_default_fill_changed | ( | ) | [protected, virtual] |
References Papyrus::Drawable::redraw().
Referenced by set_fill().
void Papyrus::Tiling::on_fill_changed | ( | unsigned | column, | |
unsigned | row | |||
) | [protected, virtual] |
References Papyrus::Drawable::redraw().
Referenced by set_fill().
void Papyrus::Tiling::on_stroke_changed | ( | ) | [protected, virtual] |
References Papyrus::Drawable::invalidate_extents(), and Papyrus::Drawable::redraw().
Referenced by set_stroke().
Papyrus::Tiling::PAPYRUS_RENDERABLE | ( | Tiling | ) |
Reimplemented from Papyrus::Drawable.
unsigned Papyrus::Tiling::rows | ( | ) | const |
References m_rows.
void Papyrus::Tiling::set_columns | ( | unsigned | c | ) |
References Papyrus::Drawable::freeze(), m_columns, shape_changed(), Papyrus::Drawable::thaw(), and update_centroid_y().
Referenced by set_columns_rows().
void Papyrus::Tiling::set_columns_rows | ( | unsigned | c, | |
unsigned | r | |||
) |
Sets the number of columns and rows in the quadrille.
a.k.a the width and height in squares
References Papyrus::Drawable::freeze(), m_columns, m_rows, set_columns(), set_rows(), shape_changed(), Papyrus::Drawable::thaw(), and update_centroid().
void Papyrus::Tiling::set_fill | ( | const Glib::ustring & | fill | ) |
Creates a new Fill object for the color and replaces the current fill with the new fill object.
References Papyrus::Fill::create(), Papyrus::Group::lookup_paint(), Papyrus::Drawable::m_parent, and set_fill().
void Papyrus::Tiling::set_fill | ( | const RGBA & | color | ) |
Creates a new Fill object for the color and replaces the current fill with the new fill object.
References Papyrus::Fill::create(), and set_fill().
void Papyrus::Tiling::set_fill | ( | Cairo::RefPtr< Cairo::Pattern > | pattern | ) |
Creates a new Fill object for the pattern and replaces the current fill with the new fill object.
References Papyrus::Fill::create(), and set_fill().
void Papyrus::Tiling::set_fill | ( | Paint::pointer | paint | ) |
Creates a new Fill object for the paint and replaces the current fill with the new fill object.
References Papyrus::Fill::create(), and set_fill().
void Papyrus::Tiling::set_fill | ( | Fill::pointer | fill | ) |
Sets the pattern that will be used to fill this shape.
References m_default_fill, m_default_fill_changed_connection, and on_default_fill_changed().
void Papyrus::Tiling::set_fill | ( | const Glib::ustring & | fill, | |
unsigned | column, | |||
unsigned | row | |||
) |
Creates a new Fill object for the color and replaces the current cell fill with the new fill object.
References Papyrus::Fill::create(), Papyrus::Group::lookup_paint(), Papyrus::Drawable::m_parent, and set_fill().
void Papyrus::Tiling::set_fill | ( | const RGBA & | color, | |
unsigned | column, | |||
unsigned | row | |||
) |
Creates a new Fill object for the color and replaces the current cell fill with the new fill object.
References Papyrus::Fill::create(), and set_fill().
void Papyrus::Tiling::set_fill | ( | Cairo::RefPtr< Cairo::Pattern > | pattern, | |
unsigned | column, | |||
unsigned | row | |||
) |
Creates a new Fill object for the pattern and replaces the current cell fill with the new fill object.
References Papyrus::Fill::create(), and set_fill().
void Papyrus::Tiling::set_fill | ( | Paint::pointer | paint, | |
unsigned | column, | |||
unsigned | row | |||
) |
Creates a new Fill object for the paint and replaces the current cell fill with the new fill object.
References Papyrus::Fill::create(), and set_fill().
void Papyrus::Tiling::set_fill | ( | Fill::pointer | fill, | |
unsigned | column, | |||
unsigned | row | |||
) |
Sets the pattern that will be used to fill the cell at the given position.
References m_columns, m_FILL, m_FILL_CHANGED_CONNECTION, m_rows, and on_fill_changed().
Referenced by set_fill(), and set_fill_paint().
void Papyrus::Tiling::set_fill_paint | ( | const Glib::ustring & | paint_name | ) |
Sets only the fill paint (not other fill characteristics) to the named paint.
Shapes do not inherently have a set of paints, therefore they must look to their parents. If they do not have a parent, this will have no effect.
References Papyrus::Fill::create(), m_default_fill, Papyrus::Drawable::m_parent, and set_fill().
void Papyrus::Tiling::set_fill_paint | ( | const Glib::ustring & | paint_name, | |
unsigned | column, | |||
unsigned | row | |||
) |
Sets only the fill paint (not other fill characteristics) to the named paint.
Shapes do not inherently have a set of paints, therefore they must look to their parents. If they do not have a parent, this will have no effect.
References Papyrus::Fill::create(), fill(), Papyrus::Drawable::m_parent, and set_fill().
void Papyrus::Tiling::set_rows | ( | unsigned | r | ) |
References Papyrus::Drawable::freeze(), m_rows, shape_changed(), Papyrus::Drawable::thaw(), and update_centroid_x().
Referenced by set_columns_rows().
void Papyrus::Tiling::set_side_length | ( | double | l | ) |
void Papyrus::Tiling::set_stroke | ( | const Glib::ustring & | stroke | ) |
Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.
References Papyrus::Stroke::create(), and set_stroke().
void Papyrus::Tiling::set_stroke | ( | const RGBA & | color | ) |
Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.
References Papyrus::Stroke::create(), and set_stroke().
void Papyrus::Tiling::set_stroke | ( | Cairo::RefPtr< Cairo::Pattern > | pattern | ) |
Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.
References Papyrus::Stroke::create(), and set_stroke().
void Papyrus::Tiling::set_stroke | ( | Paint::pointer | paint | ) |
Creates a new Stroke object for the paint and replaces the current stroke with the new stroke object.
References Papyrus::Stroke::create(), and set_stroke().
void Papyrus::Tiling::set_stroke | ( | Stroke::pointer | stroke | ) |
Sets the stroke style that will be used to stroke all cells of the quadrille.
References m_stroke, m_stroke_changed_connection, and on_stroke_changed().
Referenced by set_stroke(), and set_stroke_paint().
void Papyrus::Tiling::set_stroke_paint | ( | const Glib::ustring & | paint_name | ) |
Sets only the stroke paint (not other stroke characteristics) to the named paint.
Shapes do not inherently have a set of paints, therefore they must look to their parents. If they do not have a parent, this will have no effect.
References Papyrus::Stroke::create(), Papyrus::Drawable::m_parent, m_stroke, and set_stroke().
void Papyrus::Tiling::shape_changed | ( | ) | [protected, virtual] |
References Papyrus::Drawable::invalidate_extents(), and Papyrus::Drawable::redraw().
Referenced by set_columns(), set_columns_rows(), set_rows(), and set_side_length().
double Papyrus::Tiling::side_length | ( | ) | const |
References m_side_length.
Stroke::pointer Papyrus::Tiling::stroke | ( | ) |
The Stroke that will be used to draw the stroke.
References m_stroke.
Referenced by Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), and Papyrus::Deltille::draw().
virtual void Papyrus::Tiling::update_centroid | ( | ) | [protected, pure virtual] |
Implemented in Papyrus::Deltille, Papyrus::Hextille, and Papyrus::Quadrille.
Referenced by set_columns_rows(), and set_side_length().
virtual void Papyrus::Tiling::update_centroid_x | ( | ) | [protected, pure virtual] |
Implemented in Papyrus::Deltille, Papyrus::Hextille, and Papyrus::Quadrille.
Referenced by set_rows().
virtual void Papyrus::Tiling::update_centroid_y | ( | ) | [protected, pure virtual] |
Implemented in Papyrus::Deltille, Papyrus::Hextille, and Papyrus::Quadrille.
Referenced by set_columns().
unsigned Papyrus::Tiling::m_columns [protected] |
Referenced by columns(), Papyrus::Deltille::Deltille(), Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), fill(), Papyrus::Hextille::Hextille(), Papyrus::Quadrille::Quadrille(), set_columns(), set_columns_rows(), set_fill(), Tiling(), Papyrus::Quadrille::update_centroid(), Papyrus::Hextille::update_centroid(), Papyrus::Deltille::update_centroid(), Papyrus::Quadrille::update_centroid_y(), Papyrus::Hextille::update_centroid_y(), Papyrus::Deltille::update_centroid_y(), and ~Tiling().
Fill::pointer Papyrus::Tiling::m_default_fill [protected] |
Referenced by Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), fill(), set_fill(), and set_fill_paint().
sigc::connection Papyrus::Tiling::m_default_fill_changed_connection [protected] |
Referenced by set_fill().
Fill::pointer** Papyrus::Tiling::m_fill [protected] |
sigc::connection** Papyrus::Tiling::m_fill_changed_connection [protected] |
unsigned Papyrus::Tiling::m_rows [protected] |
Referenced by Papyrus::Deltille::Deltille(), Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), fill(), Papyrus::Hextille::Hextille(), Papyrus::Quadrille::Quadrille(), rows(), set_columns_rows(), set_fill(), set_rows(), Tiling(), Papyrus::Quadrille::update_centroid(), Papyrus::Hextille::update_centroid(), Papyrus::Deltille::update_centroid(), Papyrus::Quadrille::update_centroid_x(), Papyrus::Hextille::update_centroid_x(), Papyrus::Deltille::update_centroid_x(), and ~Tiling().
double Papyrus::Tiling::m_side_length [protected] |
Referenced by Papyrus::Deltille::Deltille(), Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), Papyrus::Hextille::Hextille(), Papyrus::Quadrille::Quadrille(), set_side_length(), side_length(), Papyrus::Quadrille::update_centroid(), Papyrus::Hextille::update_centroid(), Papyrus::Deltille::update_centroid(), Papyrus::Quadrille::update_centroid_x(), Papyrus::Hextille::update_centroid_x(), Papyrus::Deltille::update_centroid_x(), Papyrus::Quadrille::update_centroid_y(), Papyrus::Hextille::update_centroid_y(), and Papyrus::Deltille::update_centroid_y().
Stroke::pointer Papyrus::Tiling::m_stroke [protected] |
Referenced by Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), set_stroke(), set_stroke_paint(), and stroke().
sigc::connection Papyrus::Tiling::m_stroke_changed_connection [protected] |
Referenced by set_stroke().