Drawable is the base class for objects capable of being drawn into a cairo context that also have spatial properties; i.e. More...
#include <drawable.h>
Classes | |
struct | CountedConnection |
Internal structure exposed for the unit test framework. More... | |
Public Types | |
typedef std::list < Matrix::pointer > | MatrixList |
typedef std::map< int, MatrixList > | MatrixMap |
typedef std::map < Matrix::pointer, CountedConnection > | MatrixConnMap |
Internals exposed for the unit test framework. | |
Public Member Functions | |
PAPYRUS_RENDERABLE (Drawable) | |
virtual | ~Drawable () |
virtual void | set (const AttributeValueMap &avmap) |
bool | is_visible () const |
void | show () |
void | hide () |
double | alpha () const |
void | set_alpha (double a) |
double | x () const |
X position. | |
void | set_x (double x) |
Absolute move of the x position. | |
double | y () const |
Y position. | |
void | set_y (double y) |
Absolute move of the y position. | |
void | get_xy (double &x, double &y) |
(X,Y) position | |
void | set_xy (double x, double y) |
Absolute move to (x,y). | |
void | translate (double tx, double ty) |
Relative translation of the current position by (tx, ty). | |
void | get_scale (double &sx, double &sy) |
convenience method to get scaling in x and y dimensions with a single function call | |
double | get_scale_x () const |
The current x dimension scaling value. | |
double | get_scale_y () const |
The current y dimension scaling value. | |
void | set_scale_x (double sx) |
Absolute set of the x dimension scaling value. | |
void | set_scale_y (double sy) |
Absolute set of the y dimension scaling value. | |
void | set_scale (double scale_x, double scale_y) |
Absolute set of the x and y dimension scalings using independent values for each. | |
void | set_scale (double s) |
Absolute set of the x and y dimension scalings using a uniform scaling value. | |
void | scale (double s) |
Uniformly scales the current x and y scaling values by s. | |
void | scale (double scale_x, double scale_y) |
Independently scales the current x and y scaling values. | |
double | get_rotation (DegRad unit=RADIANS) const |
Get rotation r in the specified units. | |
void | set_rotation (double r, DegRad unit=RADIANS) |
Absolute set of the current rotation value to r using the specified units. | |
void | rotate (double r, DegRad unit=RADIANS) |
Relative rotation of the current value by r. | |
void | get_skew (double &skewx, double &skewy, DegRad unit=RADIANS) |
Get the x and y skewing angles. | |
double | get_skew_x (DegRad unit=RADIANS) const |
Gets the current x-axis skew angle. | |
double | get_skew_y (DegRad unit=RADIANS) const |
Gets the current y-axis skew angle. | |
void | set_skew_x (double skewx, DegRad unit=RADIANS) |
Absolute set of the x-axis skewing angle. | |
void | set_skew_y (double skewy, DegRad unit=RADIANS) |
Absolute set of the y-axis skewing angle. | |
void | set_skew (double skewx, double skewy, DegRad unit=RADIANS) |
Absolute set of the x-axis and y-axis skewing angles using separate values for each axis. | |
void | set_skew (double s, DegRad unit=RADIANS) |
Absolute set of the x-axis and y-axis skewing angles using the same value for each axis. | |
void | skew (double x, double y, DegRad unit=RADIANS) |
Relative skewing of the x-axis and y-axis angles using separate values for each axis. | |
void | skew (double s, DegRad unit=RADIANS) |
Relative skewing of the x-axis and y-axis angles by the same value for each axis. | |
double | centroid_x () const |
Get centroid x position about which the Drawable is rotated. | |
void | set_centroid_x (double centroid_x) |
Set the x value of the centroid about which the Drawable will be rotated. | |
double | centroid_y () const |
Get centroid y position about which the Drawable is rotated. | |
void | set_centroid_y (double centroid_y) |
Set the y value of the centroid about which the Drawable will be rotated. | |
void | get_centroid (double ¢roid_x, double ¢roid_y) |
Get the (x,y) centroid about which the Drawable will be rotated. | |
void | set_centroid (double centroid_x, double centroid_y) |
Set the (x,y) centroid about which the Drawable will be rotated. | |
const Matrix & | matrix () const |
Returns the matrix used for this object's drawing. | |
const Matrix & | composed_matrix () const |
Return the composed matrix of this drawable. | |
void | add_matrix (const Matrix::pointer m, int level=0) |
Add an transformation matrix at the specified level. | |
void | remove_matrix (const Matrix::pointer m) |
Remove matrix m from all matrix levels. | |
void | remove_matrix (const Matrix::pointer m, int level) |
Remove matrix m from the specified level. | |
const MatrixMap & | matrices () |
Get the map of external matrices for this object. | |
const MatrixConnMap & | matrix_connection_map () |
Internals exposed for the unit test framework. | |
virtual Matrix | global_matrix () const |
Returns the global matrix that will be applied to this drawable. | |
void | global_to_local (double &x, double &y) const |
Transform a global point to the drawable's local coordinates. | |
void | local_to_global (double &x, double &y) const |
Transform a local point to global coordinates. | |
void | distance_global_to_local (double &x, double &y) const |
Transform a global distance to the drawable's local coordinates. | |
void | distance_local_to_global (double &x, double &y) const |
Transform a local distance to global coordinates. | |
virtual void | render (Context &cairo) const |
Reimplemented render method from renderable. | |
virtual void | render (Context &cairo, double x, double y, double w, double h) const |
Reimplemented render method from renderable. | |
virtual void | draw (Context &cairo) const =0 |
Pure virtual draw method to be reimplemented by children. | |
virtual void | freeze () |
Freeze the drawable, preventing any changes until it is thawed. | |
virtual void | thaw (bool force_redraw=false) |
Thaw the drawable, causing any changes to be updated. | |
bool | is_frozen () |
True if the drawable is frozen. | |
int | composite_operator () |
Returns the Cairomm composite operator enumerated value, or -1 if the composite operator is not set. | |
void | set_composite_operator (Cairo::Operator op) |
Sets the composite operator of this drawable. | |
void | clear_composite_operator () |
Removes the composite operator. | |
virtual Region | extents (const Matrix &m=Matrix::Identity, ExtentsPerformance ep=EXTENTS_QUICK) const |
Returns the extents of this drawable. | |
virtual Region | pre_viewbox_extents (const Matrix &m=Matrix::Identity, ExtentsPerformance ep=EXTENTS_QUICK) const |
Raw extents with only the composition matrix applied. | |
virtual Region | raw_extents () const |
These are the extents of the drawable without any matrices applied. | |
virtual Region | global_extents () const |
Returns the global extents of this drawable. | |
bool | exclude_from_extents () |
Calculate a drawable's extents, applying matrix m. | |
void | set_exclude_from_extents (bool b=true) |
Exclude this drawable from all extents calculations of its parent. | |
virtual Region | calculate_extents (const Matrix &m=Matrix::Identity, ExtentsPerformance ep=EXTENTS_QUICK) const |
Calculate the extents of this drawable when the specified matrix is applied. | |
void | apply_external_matrices (Matrix &m) const |
Applies external matrices to m and returns the result. | |
virtual bool | inside (double x, double y) |
True if the point (x,y) is inside this Drawable's drawing area. | |
void | set_selectable (bool selectable=true) |
Set to true if this Drawable will respond to the select method. | |
bool | is_selectable () |
True if this Drawable will respond to the select method, or false if it will not include itself in the select method. | |
virtual bool | is_group () |
True if this Drawable contains other drawables. | |
Viewbox::pointer | viewbox () |
Returns the viewbox associated with this Drawable. | |
void | set_viewbox (Viewbox::pointer viewbox=Viewbox::pointer()) |
Sets this Drawable's viewbox to the provided viewbox. | |
void | set_viewbox (double x, double y, double w, double h, Viewbox::ALIGN align=Viewbox::ALIGN_XMAX_YMAX, Viewbox::MEET_OR_SLICE meet_or_slice=Viewbox::MEET) |
void | set_viewbox (const Region ®ion, Viewbox::ALIGN align=Viewbox::ALIGN_XMAX_YMAX, Viewbox::MEET_OR_SLICE meet_or_slice=Viewbox::MEET) |
void | set_viewbox (const Viewbox &viewbox) |
Sets this Drawable's viewbox to the provided viewbox. | |
sigc::signal< void, double, double, double, double > & | signal_redraw () |
Signal emitted with x,y,w,h values when this Drawable needs to be redrawn. | |
sigc::signal< void > & | signal_selectable () |
Signal emitted when the selectable value is changed. | |
sigc::signal< void > & | signal_destroyed () |
Signal emitted when this drawable is destroyed. | |
sigc::signal< void, FrozenThawed > & | signal_frozen () |
Signal emitted when the frozen/thawed state is changed. | |
sigc::signal< void > & | signal_composed_matrix_invalidated () |
Signal emitted when the composed matrix is invalidated. | |
sigc::signal< void > & | signal_extents_changed () |
Signal emitted when the extents are changed. | |
void | reset_position () |
Reset position to default values of xy = (0,0), scale = (1,1), rotation = 0, and shear xy = (0,0). | |
void | redraw_proxy () |
This is a proxy for the virtual redraw() method. | |
virtual pointer | clone () const =0 |
operator pointer () | |
pointer | self () |
virtual Group * | parent () |
Protected Member Functions | |
Drawable (const Glib::ustring &id=Glib::ustring(), double tx=0.0, double ty=0.0, double sx=1.0, double sy=1.0, double r=0.0) | |
Constructor that sets initial transforms. | |
void | on_matrix_changed () |
virtual Matrix | calculate_composed_matrix () const |
Recalculates m_matrix if m_regenerate_matrix is true and sets m_regenerate_matrix to false; does nothing if m_regenerate_matrix is false. | |
void | on_viewbox_changed () |
virtual void | redraw () |
Convenience method that children can call and will take care of emitting the need redraw signal with the proper parameters. | |
Glib::ustring | svg_transform () |
void | invalidate_matrix () |
void | invalidate_composed_matrix () |
void | invalidate_extents () |
Protected Attributes | |
weak_pointer | m_self |
Group * | m_parent |
MatrixMap | m_matrices |
MatrixConnMap | m_matrix_connections |
int | m_composite_operator |
bool | m_visible |
double | m_alpha |
bool | m_frozen |
If true the drawable is frozen. | |
bool | m_frozen_by_parent |
If true the drawable is frozen by parent. | |
bool | m_need_redraw |
If true a redraw will occur when thawed or when parent is unthawed. | |
bool | m_selectable |
whether the drawable is selectable | |
Viewbox::pointer | m_viewbox |
Pointer to a viewbox, which may be null if this Drawable doesn't have a viewbox. | |
sigc::connection | m_viewbox_connection |
sigc::signal< void, double, double, double, double > | m_signal_redraw |
Signal emitted when this object has changed and needs to be redrawn. | |
sigc::signal< void > | m_signal_selectable |
Signal emitted when the selectable value is changed. | |
sigc::signal< void > | m_signal_destroyed |
Signal emitted when this drawable is destroyed. | |
sigc::signal< void, FrozenThawed > | m_signal_frozen |
Signal emitted when the drawable is frozen / thawed. | |
sigc::signal< void > | m_signal_composed_matrix_invalidated |
Signal emitted when the composed matrix is invalidated. | |
sigc::signal< void > | m_signal_extents_changed |
Signal emitted when the extents change. | |
bool | m_exclude_from_extents |
If true, this object will be excluded from a parent's extents calculation. | |
Static Protected Attributes | |
static Cairo::RefPtr < Cairo::ImageSurface > | m_sidebuffer_image |
static Context | m_sidebuffer_cairo |
Private Attributes | |
double | m_x |
x position | |
double | m_y |
y position | |
double | m_sx |
x scaling value | |
double | m_sy |
y scaling value | |
double | m_r |
rotation value in radians | |
double | m_skewx |
skew x angle in radians | |
double | m_skewy |
skew y angle in radians | |
double | m_centroid_x |
x centroid value | |
double | m_centroid_y |
y centroid value | |
Matrix | m_composed_matrix |
The drawable's local matrix. | |
bool | m_composed_matrix_invalid |
When true, this drawable's transformation matrix is invalid and needs to be calculated. | |
Matrix | m_matrix |
This is the final matrix applied when drawing occurs and is the composed matrix multiplied by the viewbox matrix. | |
bool | m_matrix_invalid |
Region | m_extents |
These are the final extents of the drawable. | |
bool | m_extents_invalid |
Region | m_redraw_extents |
Redraw extents containing areas that need redraws including the current extents plus any old ones. | |
Region | m_pre_viewbox_extents |
These are the extents of the drawable without the transformation matrix applied. | |
bool | m_pre_viewbox_extents_invalid |
If true, calculate_pre_viewbox_extents() will be called before extents() or pre_viewbox_extents() returns. | |
Friends | |
class | Group |
Drawable is the base class for objects capable of being drawn into a cairo context that also have spatial properties; i.e.
affine transforms can be meaningfully applied to drawables. It is the presence of meaningful affine transforms that differentiates Drawable from its parent Renderable.
However Drawable lacks a concept of filling and outlining which differentiates it from its child Shape.
rotate(90,DEGREES)
causes the current rotation value to increase by 90'. Thus, if the rotation angle before the call to rotate
was 0.00, the resulting rotation angle will be 90'. However, if the previous value was 180' the current value will now be 270'.set_
[noun] form ( Drawable::set_x, Drawable::set_y, Drawable::set_rotation )set_rotation(90,DEGREES)
causes the current rotation value to be set to 90'. The previous rotation value doesn't matter.get_
[noun] ( Drawable::get_rotation, Drawable::get_scale, Drawable::get_scale_x, Drawable::get_scale_y )get_translation_x()
, get_translation_y()
and get_translation_xy()
.typedef std::map<Matrix::pointer, CountedConnection> Papyrus::Drawable::MatrixConnMap |
Internals exposed for the unit test framework.
Don't use this.
This is a map between an external matrix and a structure that contains a connection to the matrix' changed signal and a count of how many times that matrix has been added to this drawable.
typedef std::list<Matrix::pointer> Papyrus::Drawable::MatrixList |
typedef std::map<int,MatrixList> Papyrus::Drawable::MatrixMap |
Papyrus::Drawable::Drawable | ( | const Glib::ustring & | id = Glib::ustring() , |
|
double | tx = 0.0 , |
|||
double | ty = 0.0 , |
|||
double | sx = 1.0 , |
|||
double | sy = 1.0 , |
|||
double | r = 0.0 | |||
) | [protected] |
Papyrus::Drawable::~Drawable | ( | ) | [virtual] |
References m_signal_destroyed.
void Papyrus::Drawable::add_matrix | ( | const Matrix::pointer | m, | |
int | level = 0 | |||
) |
Add an transformation matrix at the specified level.
All matrices at a level < 0 are composed before the object's affine matrix matrix and all matrices at a level >= 0 are composed after the object's affine matrix.
Matrices on the same level are composed in the order added.
References invalidate_composed_matrix(), m_matrices, m_matrix_connections, on_matrix_changed(), and redraw().
Referenced by set().
double Papyrus::Drawable::alpha | ( | ) | const |
References m_alpha.
Referenced by Papyrus::Image::set_image().
void Papyrus::Drawable::apply_external_matrices | ( | Matrix & | m | ) | const |
Applies external matrices to m and returns the result.
References m_matrices.
Referenced by Papyrus::Reference::calculate_composed_matrix(), calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
Matrix Papyrus::Drawable::calculate_composed_matrix | ( | ) | const [protected, virtual] |
Recalculates m_matrix if m_regenerate_matrix is true and sets m_regenerate_matrix to false; does nothing if m_regenerate_matrix is false.
Reimplemented in Papyrus::Canvas, and Papyrus::Reference.
References apply_external_matrices(), m_centroid_x, m_centroid_y, m_r, m_skewx, m_skewy, m_sx, m_sy, m_x, m_y, Papyrus::Matrix::rotate(), Papyrus::Matrix::scale(), Papyrus::Matrix::set_identity(), Papyrus::Matrix::skew(), and Papyrus::Matrix::translate().
Referenced by composed_matrix().
Region Papyrus::Drawable::calculate_extents | ( | const Matrix & | m = Matrix::Identity , |
|
ExtentsPerformance | ep = EXTENTS_QUICK | |||
) | const [virtual] |
Calculate the extents of this drawable when the specified matrix is applied.
Reimplemented in Papyrus::Boxed, Papyrus::Circle, Papyrus::Group, Papyrus::Handlebox, Papyrus::Image, Papyrus::Rectangle, and Papyrus::Reference.
References Papyrus::Context::flags, m_sidebuffer_cairo, render(), Papyrus::RENDER_SUPPRESS_CAIRO_FILL, Papyrus::RENDER_SUPPRESS_CAIRO_SAVE_RESTORE, Papyrus::RENDER_SUPPRESS_CAIRO_STROKE, Papyrus::RENDER_SUPPRESS_MATRIX, Papyrus::Context::restore(), Papyrus::Context::save(), and Papyrus::Context::transform().
Referenced by Papyrus::Polyline::calculate_pre_viewbox_extents(), extents(), global_extents(), pre_viewbox_extents(), and raw_extents().
double Papyrus::Drawable::centroid_x | ( | ) | const |
Get centroid x position about which the Drawable is rotated.
References m_centroid_x.
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
double Papyrus::Drawable::centroid_y | ( | ) | const |
Get centroid y position about which the Drawable is rotated.
References m_centroid_y.
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
void Papyrus::Drawable::clear_composite_operator | ( | ) |
Removes the composite operator.
This is different than setting the composite operator to the default cairo operator which is the OVER operator.
This results in a absolute removal of the operator, causing the scenegraph to not explicitly set the cairo engine to any state when drawing.
References m_composite_operator, and redraw().
virtual pointer Papyrus::Drawable::clone | ( | ) | const [pure virtual] |
const Matrix & Papyrus::Drawable::composed_matrix | ( | ) | const |
Return the composed matrix of this drawable.
The composed matrix is the internal matrix composed with all external matrices except the viewbox matrix.
If this drawable does not have a viewbox the composed matrix will always be the final matrix when drawing.
References calculate_composed_matrix(), invalidate_matrix(), m_composed_matrix, and m_composed_matrix_invalid.
Referenced by Papyrus::Boxed::calculate_extents(), Papyrus::Canvas::canvas_to_window(), extents(), global_extents(), Papyrus::Reference::global_matrix(), global_matrix(), matrix(), Papyrus::Group::on_child_redraw(), pre_viewbox_extents(), svg_transform(), and Papyrus::Canvas::window_to_canvas().
int Papyrus::Drawable::composite_operator | ( | ) |
Returns the Cairomm composite operator enumerated value, or -1 if the composite operator is not set.
References m_composite_operator.
void Papyrus::Drawable::distance_global_to_local | ( | double & | x, | |
double & | y | |||
) | const |
Transform a global distance to the drawable's local coordinates.
References global_matrix(), Papyrus::Matrix::invert(), matrix(), and Papyrus::Matrix::transform_distance().
void Papyrus::Drawable::distance_local_to_global | ( | double & | x, | |
double & | y | |||
) | const |
Transform a local distance to global coordinates.
References global_matrix(), and Papyrus::Matrix::transform_distance().
virtual void Papyrus::Drawable::draw | ( | Context & | cairo | ) | const [pure virtual] |
Pure virtual draw method to be reimplemented by children.
This method is called by the supplied render method after the local transformation matrix has been applied to the cairo stack.
Implemented in Papyrus::Bezierline, Papyrus::Boxed, Papyrus::Canvas, Papyrus::Grid, Papyrus::Group, Papyrus::Image, Papyrus::Polyline, Papyrus::Reference, Papyrus::Shape, Papyrus::Deltille, Papyrus::Face, Papyrus::Hextille, and Papyrus::Quadrille.
Referenced by render().
bool Papyrus::Drawable::exclude_from_extents | ( | ) |
Calculate a drawable's extents, applying matrix m.
This default extents calculation calls draw and uses cairo's cairo_path_extents() and cairo_stroke_extents() to calculate the extents.
Algorithmically, this is not the most efficient mechanism, but does provide a basic mechanism allowing for rapid drawable creation if you don't want to worry about the algorithmic details. If true, this drawable will not be included in any extents calculation of a parent
References m_exclude_from_extents.
Region Papyrus::Drawable::extents | ( | const Matrix & | m = Matrix::Identity , |
|
ExtentsPerformance | ep = EXTENTS_QUICK | |||
) | const [virtual] |
Returns the extents of this drawable.
These extents are the final extents of the drawable with all matrices applied
References calculate_extents(), composed_matrix(), Papyrus::EXTENTS_PRECISE, Papyrus::EXTENTS_QUICK, Papyrus::Region::include(), m_extents, m_extents_invalid, m_redraw_extents, m_viewbox, matrix(), pre_viewbox_extents(), and Papyrus::Region::transform().
Referenced by Papyrus::Handlebox::calculate_extents(), Papyrus::Image::inside(), redraw(), and render().
void Papyrus::Drawable::freeze | ( | ) | [virtual] |
Freeze the drawable, preventing any changes until it is thawed.
This is an early version that prevents the redraw signal from emitting. However, if other events trigger a redraw the changes will be reflected.
Reimplemented in Papyrus::Group.
References Papyrus::FROZEN, m_frozen, and m_signal_frozen.
Referenced by Papyrus::Image::on_image_changed(), Papyrus::Tiling::set_columns(), Papyrus::Tiling::set_columns_rows(), Papyrus::Rectangle::set_height(), Papyrus::Tiling::set_rows(), Papyrus::Tiling::set_side_length(), Papyrus::Rectangle::set_width(), and Papyrus::Rectangle::set_xywh().
void Papyrus::Drawable::get_centroid | ( | double & | centroid_x, | |
double & | centroid_y | |||
) |
Get the (x,y) centroid about which the Drawable will be rotated.
References m_centroid_x, and m_centroid_y.
double Papyrus::Drawable::get_rotation | ( | DegRad | unit = RADIANS |
) | const |
Get rotation r in the specified units.
References m_r, and Papyrus::rad2units().
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
void Papyrus::Drawable::get_scale | ( | double & | sx, | |
double & | sy | |||
) |
double Papyrus::Drawable::get_scale_x | ( | ) | const |
The current x dimension scaling value.
References m_sx.
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
double Papyrus::Drawable::get_scale_y | ( | ) | const |
The current y dimension scaling value.
References m_sy.
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
void Papyrus::Drawable::get_skew | ( | double & | skewx, | |
double & | skewy, | |||
DegRad | unit = RADIANS | |||
) |
Get the x and y skewing angles.
References m_skewx, m_skewy, and Papyrus::rad2units().
double Papyrus::Drawable::get_skew_x | ( | DegRad | unit = RADIANS |
) | const |
Gets the current x-axis skew angle.
References m_skewx, and Papyrus::rad2units().
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
double Papyrus::Drawable::get_skew_y | ( | DegRad | unit = RADIANS |
) | const |
Gets the current y-axis skew angle.
References m_skewy, and Papyrus::rad2units().
Referenced by Papyrus::Reference::calculate_composed_matrix(), and Papyrus::Canvas::calculate_composed_matrix().
Region Papyrus::Drawable::global_extents | ( | ) | const [virtual] |
Returns the global extents of this drawable.
Reimplemented in Papyrus::Canvas.
References calculate_extents(), composed_matrix(), global_matrix(), and m_parent.
Matrix Papyrus::Drawable::global_matrix | ( | ) | const [virtual] |
Returns the global matrix that will be applied to this drawable.
Reimplemented in Papyrus::Canvas, and Papyrus::Reference.
References composed_matrix(), global_matrix(), m_parent, and matrix().
Referenced by distance_global_to_local(), distance_local_to_global(), global_extents(), Papyrus::Canvas::global_extents(), Papyrus::Reference::global_matrix(), global_matrix(), Papyrus::Canvas::global_matrix(), global_to_local(), and local_to_global().
void Papyrus::Drawable::global_to_local | ( | double & | x, | |
double & | y | |||
) | const |
Transform a global point to the drawable's local coordinates.
References global_matrix(), Papyrus::Matrix::invert(), matrix(), and Papyrus::Matrix::transform_point().
void Papyrus::Drawable::hide | ( | ) |
References m_visible, and redraw().
Referenced by Papyrus::Handlebox::on_child_removed().
bool Papyrus::Drawable::inside | ( | double | x, | |
double | y | |||
) | [virtual] |
True if the point (x,y) is inside this Drawable's drawing area.
Reimplemented in Papyrus::Group, and Papyrus::Image.
References Papyrus::Context::flags, m_sidebuffer_cairo, render(), Papyrus::RENDER_SUPPRESS_CAIRO_FILL, Papyrus::RENDER_SUPPRESS_CAIRO_STROKE, Papyrus::Context::restore(), and Papyrus::Context::save().
Referenced by Papyrus::Handlebox::inside_handle().
void Papyrus::Drawable::invalidate_composed_matrix | ( | ) | [protected] |
References m_composed_matrix_invalid, m_extents_invalid, m_matrix_invalid, m_pre_viewbox_extents_invalid, and m_signal_composed_matrix_invalidated.
Referenced by add_matrix(), on_matrix_changed(), Papyrus::Reference::Reference(), remove_matrix(), reset_position(), rotate(), scale(), Papyrus::Canvas::scroll_to(), Papyrus::Canvas::scroll_to_x(), Papyrus::Canvas::scroll_to_y(), set_centroid(), set_centroid_x(), set_centroid_y(), Papyrus::Reference::set_referenced(), set_rotation(), set_scale(), set_scale_x(), set_scale_y(), Papyrus::Canvas::set_scroll_anchor(), Papyrus::Canvas::set_size(), set_skew(), set_skew_x(), set_skew_y(), set_x(), set_xy(), set_y(), skew(), and translate().
void Papyrus::Drawable::invalidate_extents | ( | ) | [protected] |
References m_extents_invalid, m_matrix_invalid, m_pre_viewbox_extents_invalid, and m_signal_extents_changed.
Referenced by Papyrus::Group::clear(), matrix(), Papyrus::Boxed::on_child_added(), Papyrus::Group::on_child_changed(), Papyrus::Boxed::on_child_changed(), Papyrus::Boxed::on_child_removed(), Papyrus::Boxed::on_cleared(), Papyrus::Image::on_image_changed(), Papyrus::Tiling::on_stroke_changed(), Papyrus::Shape::on_stroke_changed(), Papyrus::Boxed::on_watched_event(), Papyrus::Group::remove(), Papyrus::Canvas::set_device_resolution(), Papyrus::Canvas::set_height(), Papyrus::Face::set_size(), Papyrus::Face::set_size_type(), Papyrus::Canvas::set_units(), Papyrus::Canvas::set_width(), Papyrus::Tiling::shape_changed(), and Papyrus::Shape::shape_changed().
void Papyrus::Drawable::invalidate_matrix | ( | ) | [protected] |
References m_extents_invalid, and m_matrix_invalid.
Referenced by composed_matrix(), on_viewbox_changed(), pre_viewbox_extents(), and set_viewbox().
bool Papyrus::Drawable::is_frozen | ( | ) |
True if the drawable is frozen.
References m_frozen, and m_frozen_by_parent.
bool Papyrus::Drawable::is_group | ( | ) | [virtual] |
True if this Drawable contains other drawables.
Reimplemented in Papyrus::Group.
bool Papyrus::Drawable::is_selectable | ( | ) |
True if this Drawable will respond to the select method, or false if it will not include itself in the select method.
References m_selectable.
bool Papyrus::Drawable::is_visible | ( | ) | const |
References m_visible.
Referenced by Papyrus::Handlebox::on_child_added().
void Papyrus::Drawable::local_to_global | ( | double & | x, | |
double & | y | |||
) | const |
Transform a local point to global coordinates.
References global_matrix(), and Papyrus::Matrix::transform_point().
const Drawable::MatrixMap & Papyrus::Drawable::matrices | ( | ) |
Get the map of external matrices for this object.
References m_matrices.
const Matrix & Papyrus::Drawable::matrix | ( | ) | const |
Returns the matrix used for this object's drawing.
References composed_matrix(), invalidate_extents(), m_extents, m_extents_invalid, m_matrix, m_matrix_invalid, m_viewbox, pre_viewbox_extents(), and Papyrus::Region::transform().
Referenced by distance_global_to_local(), extents(), global_matrix(), global_to_local(), Papyrus::Group::inside(), render(), and Papyrus::Group::select().
const Drawable::MatrixConnMap & Papyrus::Drawable::matrix_connection_map | ( | ) |
Internals exposed for the unit test framework.
Don't use this.
Get the matrix connection map for this object
References m_matrix_connections.
void Papyrus::Drawable::on_matrix_changed | ( | ) | [protected] |
References invalidate_composed_matrix(), and redraw().
Referenced by add_matrix(), and set_viewbox().
void Papyrus::Drawable::on_viewbox_changed | ( | ) | [protected] |
References invalidate_matrix(), and redraw().
Papyrus::Drawable::operator Drawable::pointer | ( | ) |
Papyrus::Drawable::PAPYRUS_RENDERABLE | ( | Drawable | ) |
Reimplemented in Papyrus::Shape, and Papyrus::Tiling.
Region Papyrus::Drawable::pre_viewbox_extents | ( | const Matrix & | m = Matrix::Identity , |
|
ExtentsPerformance | ep = EXTENTS_QUICK | |||
) | const [virtual] |
Raw extents with only the composition matrix applied.
References calculate_extents(), composed_matrix(), Papyrus::EXTENTS_PRECISE, Papyrus::EXTENTS_QUICK, invalidate_matrix(), m_pre_viewbox_extents, m_pre_viewbox_extents_invalid, and Papyrus::Region::transform().
Region Papyrus::Drawable::raw_extents | ( | ) | const [virtual] |
These are the extents of the drawable without any matrices applied.
References calculate_extents().
void Papyrus::Drawable::redraw | ( | ) | [protected, virtual] |
Convenience method that children can call and will take care of emitting the need redraw signal with the proper parameters.
For efficiency, if a child needs less than a complete redraw the child could reimplement this method.
References extents(), Papyrus::Region::include(), Papyrus::Region::invalidate(), m_frozen, m_frozen_by_parent, m_need_redraw, m_redraw_extents, Papyrus::Object::m_signal_changed, m_signal_redraw, m_visible, x(), Papyrus::Region::xywh(), and y().
Referenced by Papyrus::Group::add(), add_matrix(), Papyrus::Group::clear(), clear_composite_operator(), Papyrus::Grid::disable_axis(), Papyrus::Grid::disable_border(), Papyrus::Grid::enable_axis(), Papyrus::Grid::enable_border(), Papyrus::Group::enable_intermediate_drawing(), hide(), Papyrus::Group::move_to_layer(), Papyrus::Boxed::on_child_added(), Papyrus::Boxed::on_child_changed(), Papyrus::Boxed::on_child_removed(), Papyrus::Boxed::on_cleared(), Papyrus::Tiling::on_default_fill_changed(), Papyrus::Tiling::on_fill_changed(), Papyrus::Shape::on_fill_changed(), on_matrix_changed(), Papyrus::Tiling::on_stroke_changed(), Papyrus::Shape::on_stroke_changed(), on_viewbox_changed(), Papyrus::Boxed::on_watched_event(), redraw_proxy(), Papyrus::Group::remove(), remove_matrix(), reset_position(), rotate(), scale(), Papyrus::Canvas::scroll_to(), Papyrus::Canvas::scroll_to_x(), Papyrus::Canvas::scroll_to_y(), set_alpha(), Papyrus::Canvas::set_background(), Papyrus::Boxed::set_box_position(), set_centroid(), set_centroid_x(), set_centroid_y(), set_composite_operator(), Papyrus::Canvas::set_device_resolution(), set_exclude_from_extents(), Papyrus::Group::set_fill(), Papyrus::Canvas::set_height(), Papyrus::Reference::set_referenced(), set_rotation(), set_scale(), set_scale_x(), set_scale_y(), Papyrus::Canvas::set_scroll_anchor(), Papyrus::Face::set_size(), Papyrus::Canvas::set_size(), Papyrus::Face::set_size_type(), set_skew(), set_skew_x(), set_skew_y(), Papyrus::Group::set_stroke(), Papyrus::Face::set_type(), Papyrus::Canvas::set_units(), set_viewbox(), Papyrus::Canvas::set_width(), set_x(), Papyrus::Grid::set_x_axis_stroke(), Papyrus::Grid::set_x_interval(), Papyrus::Grid::set_x_interval_stroke(), Papyrus::Grid::set_x_max(), Papyrus::Grid::set_x_min(), Papyrus::Grid::set_x_min_max(), set_xy(), Papyrus::Grid::set_xy_axis_stroke(), Papyrus::Grid::set_xy_interval(), Papyrus::Grid::set_xy_interval_stroke(), Papyrus::Grid::set_xy_min_max(), set_y(), Papyrus::Grid::set_y_axis_stroke(), Papyrus::Grid::set_y_interval(), Papyrus::Grid::set_y_interval_stroke(), Papyrus::Grid::set_y_max(), Papyrus::Grid::set_y_min(), Papyrus::Grid::set_y_min_max(), Papyrus::Tiling::shape_changed(), Papyrus::Shape::shape_changed(), show(), skew(), thaw(), and translate().
void Papyrus::Drawable::redraw_proxy | ( | ) |
void Papyrus::Drawable::remove_matrix | ( | const Matrix::pointer | m, | |
int | level | |||
) |
Remove matrix m from the specified level.
If matrix m is not on the level specified no action will be taken.
References invalidate_composed_matrix(), m_matrices, m_matrix_connections, and redraw().
void Papyrus::Drawable::remove_matrix | ( | const Matrix::pointer | m | ) |
Remove matrix m from all matrix levels.
References invalidate_composed_matrix(), m_matrices, m_matrix_connections, and redraw().
void Papyrus::Drawable::render | ( | Context & | cairo, | |
double | x, | |||
double | y, | |||
double | w, | |||
double | h | |||
) | const [virtual] |
Reimplemented render method from renderable.
Similar to the render(cairo context) method except checks to see if the renderable is within the bounding box before rendering.
Reimplemented from Papyrus::Renderable.
void Papyrus::Drawable::render | ( | Context & | cairo | ) | const [virtual] |
Reimplemented render method from renderable.
Generally, children should reimplement the draw method rather than this method.
Performs the following actions: 1. Pushes cairo state onto the stack 2. Recalculates local matrix if necessary 3. Applies the local matrix to the current matrix 4. Calls the virtual draw method 5. Restores the cairo state
Implements Papyrus::Renderable.
References draw(), m_alpha, m_composite_operator, m_viewbox, m_visible, matrix(), Papyrus::Context::paint_with_alpha(), Papyrus::Context::restore(), Papyrus::Context::save(), Papyrus::Viewbox::SLICE, Papyrus::Context::transform(), x(), and y().
Referenced by calculate_extents(), Papyrus::Quadrille::draw(), Papyrus::Polyline::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), inside(), and render().
void Papyrus::Drawable::reset_position | ( | ) |
Reset position to default values of xy = (0,0), scale = (1,1), rotation = 0, and shear xy = (0,0).
References invalidate_composed_matrix(), m_centroid_x, m_centroid_y, m_r, m_skewx, m_skewy, m_sx, m_sy, m_x, m_y, and redraw().
void Papyrus::Drawable::rotate | ( | double | r, | |
DegRad | unit = RADIANS | |||
) |
Relative rotation of the current value by r.
If previous rotation was pr then new rotation is pr+r
References invalidate_composed_matrix(), m_r, redraw(), and Papyrus::units2rad().
void Papyrus::Drawable::scale | ( | double | scale_x, | |
double | scale_y | |||
) |
Independently scales the current x and y scaling values.
scale_x | The amount to scale the x dimension by; must be > 0.0 or no change will occur | |
scale_y | The amount to scale the y dimension by; must be > 0.0 or no change will occur |
References invalidate_composed_matrix(), m_sx, m_sy, and redraw().
void Papyrus::Drawable::scale | ( | double | s | ) |
Uniformly scales the current x and y scaling values by s.
s | The amount to scale the x and y dimensions by; must be > 0.0 or no change will occur |
References invalidate_composed_matrix(), m_sx, m_sy, and redraw().
Drawable::pointer Papyrus::Drawable::self | ( | ) |
References m_self.
void Papyrus::Drawable::set | ( | const AttributeValueMap & | avmap | ) | [virtual] |
Reimplemented from Papyrus::Object.
Reimplemented in Papyrus::Circle, Papyrus::Group, Papyrus::Path, Papyrus::Rectangle, and Papyrus::Shape.
References add_matrix(), Papyrus::Matrix::create(), set_x(), set_y(), and Papyrus::strcaseeq().
void Papyrus::Drawable::set_centroid | ( | double | centroid_x, | |
double | centroid_y | |||
) |
Set the (x,y) centroid about which the Drawable will be rotated.
References invalidate_composed_matrix(), m_centroid_x, m_centroid_y, and redraw().
Referenced by Papyrus::Deltille::Deltille(), Papyrus::Hextille::Hextille(), Papyrus::Image::on_image_changed(), Papyrus::Quadrille::Quadrille(), Papyrus::Rectangle::set_xywh(), Papyrus::Quadrille::update_centroid(), Papyrus::Hextille::update_centroid(), and Papyrus::Deltille::update_centroid().
void Papyrus::Drawable::set_centroid_x | ( | double | centroid_x | ) |
Set the x value of the centroid about which the Drawable will be rotated.
References invalidate_composed_matrix(), m_centroid_x, and redraw().
Referenced by Papyrus::Rectangle::set_width(), Papyrus::Quadrille::update_centroid_x(), Papyrus::Hextille::update_centroid_x(), and Papyrus::Deltille::update_centroid_x().
void Papyrus::Drawable::set_centroid_y | ( | double | centroid_y | ) |
Set the y value of the centroid about which the Drawable will be rotated.
References invalidate_composed_matrix(), m_centroid_y, and redraw().
Referenced by Papyrus::Rectangle::set_height(), Papyrus::Quadrille::update_centroid_y(), Papyrus::Hextille::update_centroid_y(), and Papyrus::Deltille::update_centroid_y().
void Papyrus::Drawable::set_composite_operator | ( | Cairo::Operator | op | ) |
Sets the composite operator of this drawable.
References m_composite_operator, and redraw().
void Papyrus::Drawable::set_exclude_from_extents | ( | bool | b = true |
) |
Exclude this drawable from all extents calculations of its parent.
References m_exclude_from_extents, and redraw().
void Papyrus::Drawable::set_rotation | ( | double | r, | |
DegRad | unit = RADIANS | |||
) |
Absolute set of the current rotation value to r using the specified units.
References invalidate_composed_matrix(), m_r, redraw(), and Papyrus::units2rad().
Referenced by Papyrus::Polyline::draw().
void Papyrus::Drawable::set_scale | ( | double | s | ) |
Absolute set of the x and y dimension scalings using a uniform scaling value.
s | The amount to scale the x and y dimensions by; must be > 0.0 or no change will occur |
References invalidate_composed_matrix(), m_sx, m_sy, and redraw().
void Papyrus::Drawable::set_scale | ( | double | scale_x, | |
double | scale_y | |||
) |
Absolute set of the x and y dimension scalings using independent values for each.
scale_x | The new x dimension scaling; must be > 0.0 or no change to x scaling will occur | |
scale_y | The new y dimension scaling; must be > 0.0 or no change to y scaling will occur |
References invalidate_composed_matrix(), m_sx, m_sy, and redraw().
void Papyrus::Drawable::set_scale_x | ( | double | sx | ) |
Absolute set of the x dimension scaling value.
sx | The new x dimension scaling; must be > 0.0 or no change to x scaling will occur |
References invalidate_composed_matrix(), m_sx, and redraw().
void Papyrus::Drawable::set_scale_y | ( | double | sy | ) |
Absolute set of the y dimension scaling value.
sy | The new y dimension scaling; must be > 0.0 or no change to y scaling will occur |
References invalidate_composed_matrix(), m_sy, and redraw().
void Papyrus::Drawable::set_selectable | ( | bool | selectable = true |
) |
Set to true if this Drawable will respond to the select method.
For example, it may not be desirable to have a group respond to the select method itself, and may instead pass the select(x,y) request to its children.
References m_selectable.
Referenced by Papyrus::Group::Group().
void Papyrus::Drawable::set_skew | ( | double | s, | |
DegRad | unit = RADIANS | |||
) |
Absolute set of the x-axis and y-axis skewing angles using the same value for each axis.
References invalidate_composed_matrix(), m_skewx, m_skewy, redraw(), and Papyrus::units2rad().
void Papyrus::Drawable::set_skew | ( | double | skewx, | |
double | skewy, | |||
DegRad | unit = RADIANS | |||
) |
Absolute set of the x-axis and y-axis skewing angles using separate values for each axis.
References invalidate_composed_matrix(), m_skewx, m_skewy, redraw(), and Papyrus::units2rad().
void Papyrus::Drawable::set_skew_x | ( | double | skewx, | |
DegRad | unit = RADIANS | |||
) |
Absolute set of the x-axis skewing angle.
References invalidate_composed_matrix(), m_skewx, redraw(), and Papyrus::units2rad().
void Papyrus::Drawable::set_skew_y | ( | double | skewy, | |
DegRad | unit = RADIANS | |||
) |
Absolute set of the y-axis skewing angle.
References invalidate_composed_matrix(), m_skewy, redraw(), and Papyrus::units2rad().
void Papyrus::Drawable::set_viewbox | ( | const Viewbox & | viewbox | ) |
Sets this Drawable's viewbox to the provided viewbox.
This method will not maintain a connection to the provided Viewbox, and will create its own copy.
References Papyrus::Viewbox::create(), and set_viewbox().
void Papyrus::Drawable::set_viewbox | ( | const Region & | region, | |
Viewbox::ALIGN | align = Viewbox::ALIGN_XMAX_YMAX , |
|||
Viewbox::MEET_OR_SLICE | meet_or_slice = Viewbox::MEET | |||
) |
References Papyrus::Viewbox::create(), and set_viewbox().
void Papyrus::Drawable::set_viewbox | ( | double | x, | |
double | y, | |||
double | w, | |||
double | h, | |||
Viewbox::ALIGN | align = Viewbox::ALIGN_XMAX_YMAX , |
|||
Viewbox::MEET_OR_SLICE | meet_or_slice = Viewbox::MEET | |||
) |
References Papyrus::Viewbox::create(), and set_viewbox().
void Papyrus::Drawable::set_viewbox | ( | Viewbox::pointer | viewbox = Viewbox::pointer() |
) |
Sets this Drawable's viewbox to the provided viewbox.
This method does not copy the viewbox, but will hold shared ownership of the shared smart pointer.
Calling set_viewbox() with no parameters sets the viewbox to a null pointer, thus removing it.
References invalidate_matrix(), m_viewbox, m_viewbox_connection, on_matrix_changed(), and redraw().
Referenced by set_viewbox().
void Papyrus::Drawable::set_x | ( | double | x | ) |
Absolute move of the x position.
If previous position was (x',y') new position is (x,y').
References invalidate_composed_matrix(), m_x, and redraw().
Referenced by Papyrus::Rectangle::Rectangle(), set(), Papyrus::Circle::set(), and Papyrus::Rectangle::set_xywh().
void Papyrus::Drawable::set_xy | ( | double | x, | |
double | y | |||
) |
Absolute move to (x,y).
References invalidate_composed_matrix(), m_x, m_y, and redraw().
void Papyrus::Drawable::set_y | ( | double | y | ) |
Absolute move of the y position.
If previous position was (x',y') new position is (x',y).
References invalidate_composed_matrix(), m_y, and redraw().
Referenced by Papyrus::Rectangle::Rectangle(), set(), Papyrus::Circle::set(), and Papyrus::Rectangle::set_xywh().
sigc::signal< void > & Papyrus::Drawable::signal_composed_matrix_invalidated | ( | ) |
Signal emitted when the composed matrix is invalidated.
References m_signal_composed_matrix_invalidated.
sigc::signal< void > & Papyrus::Drawable::signal_destroyed | ( | ) |
Signal emitted when this drawable is destroyed.
References m_signal_destroyed.
sigc::signal< void > & Papyrus::Drawable::signal_extents_changed | ( | ) |
Signal emitted when the extents are changed.
References m_signal_extents_changed.
sigc::signal< void, FrozenThawed > & Papyrus::Drawable::signal_frozen | ( | ) |
Signal emitted when the frozen/thawed state is changed.
References m_signal_frozen.
sigc::signal< void, double, double, double, double > & Papyrus::Drawable::signal_redraw | ( | ) |
Signal emitted with x,y,w,h values when this Drawable needs to be redrawn.
References m_signal_redraw.
sigc::signal< void > & Papyrus::Drawable::signal_selectable | ( | ) |
Signal emitted when the selectable value is changed.
References m_signal_selectable.
void Papyrus::Drawable::skew | ( | double | s, | |
DegRad | unit = RADIANS | |||
) |
Relative skewing of the x-axis and y-axis angles by the same value for each axis.
References invalidate_composed_matrix(), m_skewx, m_skewy, redraw(), and Papyrus::units2rad().
void Papyrus::Drawable::skew | ( | double | x, | |
double | y, | |||
DegRad | unit = RADIANS | |||
) |
Relative skewing of the x-axis and y-axis angles using separate values for each axis.
References invalidate_composed_matrix(), m_skewx, m_skewy, redraw(), and Papyrus::units2rad().
Glib::ustring Papyrus::Drawable::svg_transform | ( | ) | [protected] |
References composed_matrix(), and Papyrus::Matrix::svg().
Referenced by Papyrus::Reference::svg(), Papyrus::Rectangle::svg(), Papyrus::Path::svg(), Papyrus::Group::svg(), and Papyrus::Circle::svg().
void Papyrus::Drawable::thaw | ( | bool | force_redraw = false |
) | [virtual] |
Thaw the drawable, causing any changes to be updated.
Freeze/Thaw are still an early implementation that only prevents the redraw signal from emitting. However, if other events trigger a redraw the 'frozen' changes will still be reflected.
Reimplemented in Papyrus::Group.
References m_frozen, m_frozen_by_parent, m_need_redraw, Papyrus::Object::m_signal_changed, m_signal_frozen, redraw(), and Papyrus::THAWED.
Referenced by Papyrus::Image::on_image_changed(), Papyrus::Tiling::set_columns(), Papyrus::Tiling::set_columns_rows(), Papyrus::Rectangle::set_height(), Papyrus::Tiling::set_rows(), Papyrus::Tiling::set_side_length(), Papyrus::Rectangle::set_width(), and Papyrus::Rectangle::set_xywh().
void Papyrus::Drawable::translate | ( | double | tx, | |
double | ty | |||
) |
Relative translation of the current position by (tx, ty).
If previous position was (x',y') new position is (x'+tx, y'+ty).
References invalidate_composed_matrix(), m_x, m_y, and redraw().
Viewbox::pointer Papyrus::Drawable::viewbox | ( | ) |
double Papyrus::Drawable::x | ( | ) | const |
X position.
References m_x.
Referenced by Papyrus::Reference::calculate_composed_matrix(), Papyrus::Canvas::calculate_composed_matrix(), Papyrus::Rectangle::calculate_extents(), Papyrus::Circle::calculate_extents(), Papyrus::RegularPolygon::create_vertices(), Papyrus::Polyline::draw_shape(), Papyrus::Polygon::draw_shape(), Papyrus::Bezierline::draw_shape(), Papyrus::Beziergon::draw_shape(), redraw(), render(), Papyrus::Rectangle::set_xywh(), Papyrus::Rectangle::svg(), Papyrus::Circle::svg(), and Papyrus::Rectangle::xywh().
double Papyrus::Drawable::y | ( | ) | const |
Y position.
References m_y.
Referenced by Papyrus::Reference::calculate_composed_matrix(), Papyrus::Canvas::calculate_composed_matrix(), Papyrus::Rectangle::calculate_extents(), Papyrus::Circle::calculate_extents(), Papyrus::RegularPolygon::create_vertices(), Papyrus::Polyline::draw_shape(), Papyrus::Polygon::draw_shape(), Papyrus::Bezierline::draw_shape(), Papyrus::Beziergon::draw_shape(), redraw(), render(), Papyrus::Rectangle::set_xywh(), Papyrus::Rectangle::svg(), Papyrus::Circle::svg(), and Papyrus::Rectangle::xywh().
friend class Group [friend] |
double Papyrus::Drawable::m_alpha [protected] |
Referenced by alpha(), render(), and set_alpha().
double Papyrus::Drawable::m_centroid_x [private] |
x centroid value
Referenced by calculate_composed_matrix(), centroid_x(), get_centroid(), reset_position(), set_centroid(), and set_centroid_x().
double Papyrus::Drawable::m_centroid_y [private] |
y centroid value
Referenced by calculate_composed_matrix(), centroid_y(), get_centroid(), reset_position(), set_centroid(), and set_centroid_y().
Matrix Papyrus::Drawable::m_composed_matrix [private] |
The drawable's local matrix.
Referenced by composed_matrix().
bool Papyrus::Drawable::m_composed_matrix_invalid [private] |
When true, this drawable's transformation matrix is invalid and needs to be calculated.
Referenced by composed_matrix(), and invalidate_composed_matrix().
int Papyrus::Drawable::m_composite_operator [protected] |
Referenced by clear_composite_operator(), composite_operator(), render(), and set_composite_operator().
bool Papyrus::Drawable::m_exclude_from_extents [protected] |
If true, this object will be excluded from a parent's extents calculation.
This variable has no effect on this drawable's calculations of its own extents
Referenced by exclude_from_extents(), and set_exclude_from_extents().
Region Papyrus::Drawable::m_extents [private] |
bool Papyrus::Drawable::m_extents_invalid [private] |
Referenced by Papyrus::Group::add(), extents(), invalidate_composed_matrix(), invalidate_extents(), invalidate_matrix(), and matrix().
bool Papyrus::Drawable::m_frozen [protected] |
If true the drawable is frozen.
Referenced by Papyrus::Group::freeze(), freeze(), is_frozen(), redraw(), Papyrus::Group::thaw(), and thaw().
bool Papyrus::Drawable::m_frozen_by_parent [protected] |
If true the drawable is frozen by parent.
Referenced by is_frozen(), redraw(), Papyrus::Group::thaw(), and thaw().
MatrixMap Papyrus::Drawable::m_matrices [protected] |
Referenced by add_matrix(), apply_external_matrices(), matrices(), and remove_matrix().
Matrix Papyrus::Drawable::m_matrix [private] |
This is the final matrix applied when drawing occurs and is the composed matrix multiplied by the viewbox matrix.
Referenced by matrix().
MatrixConnMap Papyrus::Drawable::m_matrix_connections [protected] |
Referenced by add_matrix(), matrix_connection_map(), and remove_matrix().
bool Papyrus::Drawable::m_matrix_invalid [private] |
Referenced by invalidate_composed_matrix(), invalidate_extents(), invalidate_matrix(), and matrix().
bool Papyrus::Drawable::m_need_redraw [protected] |
If true a redraw will occur when thawed or when parent is unthawed.
Referenced by redraw(), Papyrus::Group::thaw(), and thaw().
Group* Papyrus::Drawable::m_parent [protected] |
Referenced by Papyrus::Shape::draw(), Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), Papyrus::Deltille::draw(), Papyrus::Group::fill(), global_extents(), Papyrus::Canvas::global_extents(), Papyrus::Reference::global_matrix(), global_matrix(), Papyrus::Canvas::global_matrix(), Papyrus::Group::lookup_drawable(), Papyrus::Group::lookup_paint(), parent(), Papyrus::Tiling::set_fill(), Papyrus::Shape::set_fill(), Papyrus::Tiling::set_fill_paint(), Papyrus::Shape::set_fill_paint(), Papyrus::Tiling::set_stroke_paint(), Papyrus::Shape::set_stroke_paint(), and Papyrus::Group::stroke().
These are the extents of the drawable without the transformation matrix applied.
Referenced by Papyrus::Group::add(), and pre_viewbox_extents().
bool Papyrus::Drawable::m_pre_viewbox_extents_invalid [private] |
If true, calculate_pre_viewbox_extents() will be called before extents() or pre_viewbox_extents() returns.
Referenced by invalidate_composed_matrix(), invalidate_extents(), and pre_viewbox_extents().
double Papyrus::Drawable::m_r [private] |
rotation value in radians
Referenced by calculate_composed_matrix(), get_rotation(), reset_position(), rotate(), and set_rotation().
Region Papyrus::Drawable::m_redraw_extents [private] |
bool Papyrus::Drawable::m_selectable [protected] |
whether the drawable is selectable
Referenced by is_selectable(), and set_selectable().
weak_pointer Papyrus::Drawable::m_self [protected] |
Referenced by self().
Context Papyrus::Drawable::m_sidebuffer_cairo [static, protected] |
Referenced by calculate_extents(), and inside().
Cairo::RefPtr< Cairo::ImageSurface > Papyrus::Drawable::m_sidebuffer_image [static, protected] |
sigc::signal<void> Papyrus::Drawable::m_signal_composed_matrix_invalidated [protected] |
Signal emitted when the composed matrix is invalidated.
Referenced by invalidate_composed_matrix(), and signal_composed_matrix_invalidated().
sigc::signal<void> Papyrus::Drawable::m_signal_destroyed [protected] |
Signal emitted when this drawable is destroyed.
Referenced by signal_destroyed(), and ~Drawable().
sigc::signal<void> Papyrus::Drawable::m_signal_extents_changed [protected] |
Signal emitted when the extents change.
Referenced by Papyrus::Group::add(), invalidate_extents(), and signal_extents_changed().
sigc::signal<void,FrozenThawed> Papyrus::Drawable::m_signal_frozen [protected] |
Signal emitted when the drawable is frozen / thawed.
Referenced by freeze(), signal_frozen(), and thaw().
sigc::signal<void, double, double, double, double> Papyrus::Drawable::m_signal_redraw [protected] |
Signal emitted when this object has changed and needs to be redrawn.
Referenced by Papyrus::Group::on_child_redraw(), redraw(), and signal_redraw().
sigc::signal<void> Papyrus::Drawable::m_signal_selectable [protected] |
Signal emitted when the selectable value is changed.
Referenced by signal_selectable().
double Papyrus::Drawable::m_skewx [private] |
skew x angle in radians
Referenced by calculate_composed_matrix(), get_skew(), get_skew_x(), reset_position(), set_skew(), set_skew_x(), and skew().
double Papyrus::Drawable::m_skewy [private] |
skew y angle in radians
Referenced by calculate_composed_matrix(), get_skew(), get_skew_y(), reset_position(), set_skew(), set_skew_y(), and skew().
double Papyrus::Drawable::m_sx [private] |
x scaling value
Referenced by calculate_composed_matrix(), Drawable(), get_scale(), get_scale_x(), reset_position(), scale(), set_scale(), and set_scale_x().
double Papyrus::Drawable::m_sy [private] |
y scaling value
Referenced by calculate_composed_matrix(), Drawable(), get_scale(), get_scale_y(), reset_position(), scale(), set_scale(), and set_scale_y().
Viewbox::pointer Papyrus::Drawable::m_viewbox [protected] |
sigc::connection Papyrus::Drawable::m_viewbox_connection [protected] |
Referenced by set_viewbox().
bool Papyrus::Drawable::m_visible [protected] |
Referenced by hide(), is_visible(), redraw(), render(), and show().
double Papyrus::Drawable::m_x [private] |
x position
Referenced by calculate_composed_matrix(), get_xy(), reset_position(), set_x(), set_xy(), translate(), and x().
double Papyrus::Drawable::m_y [private] |
y position
Referenced by calculate_composed_matrix(), get_xy(), reset_position(), set_xy(), set_y(), translate(), and y().