
#include <canvas.h>

Public Member Functions | |
| PAPYRUS_DRAWABLE (Canvas) | |
| virtual | ~Canvas () |
| virtual Matrix | global_matrix () const |
| virtual Region | global_extents () const |
| Region | anchor_extents () const |
| double | width () const |
| double | height () const |
| void | size (double &width, double &height) const |
| void | set_width (double width) |
| void | set_height (double height) |
| void | set_size (double width, double height) |
| Units | units () const |
| void | set_units (Units u) |
| void | device_resolution (double &x, double &y) const |
| bool | set_device_resolution (double x, double y) |
| Paint::pointer | background () const |
| void | set_background (Paint::pointer background) |
| void | scroll_to (double offset_x, double offset_y) |
| void | scroll_to_x (double offset_x) |
| void | scroll_to_y (double offset_y) |
| void | scroll_to_center () |
| void | scroll_position (double &x, double &y) const |
| double | scroll_x () const |
| double | scroll_y () const |
| void | set_scroll_anchor (ScrollAnchor scroll_achor=SCROLL_ANCHOR_CENTER) |
| ScrollAnchor | scroll_anchor () const |
| void | scroll_anchor_offsets (double &x, double &y) const |
| double | scroll_anchor_x_offset () const |
| double | scroll_anchor_y_offset () const |
| void | window_to_canvas (double &x, double &y) const |
| Convert window coordinates to canvas coordinates. | |
| void | canvas_to_window (double &x, double &y) const |
| Convert canvas coordinates to window coordinates. | |
| virtual Selection | select (double x, double y, unsigned depth=1) |
| sigc::signal< void > | signal_size_changed () |
| sigc::signal< void, Units > | signal_units () |
| sigc::signal< void, double, double > | signal_display_resolution () |
| sigc::signal< void, double, double > | signal_scrolled () |
| sigc::signal< void, ScrollAnchor > | signal_scroll_anchor_changed () |
Static Public Member Functions | |
| static pointer | create (double width=0.0, double height=0.0, double scale=1.0) |
| static pointer | create (const Glib::ustring &id, double width=0.0, double height=0.0, double scale=1.0) |
Protected Member Functions | |
| Canvas (const Glib::ustring &id, double width, double height, double scale) | |
| virtual void | draw (Context &cairo) const |
| virtual Matrix | calculate_composed_matrix () const |
| void | update_scroll_anchor_offsets () |
Protected Attributes | |
| double | m_width |
| double | m_height |
| double | m_scale |
| ScrollAnchor | m_scroll_anchor |
| Determines the default scroll position and the result of scroll_to_center(). | |
| double | m_scroll_anchor_offset_x |
| Stores the default scroll anchor x offset. | |
| double | m_scroll_anchor_offset_y |
| Stores the default scroll anchor y offset. | |
| double | m_scroll_x |
| Stores the current scroll x offset. | |
| double | m_scroll_y |
| Stores the current scroll y offset. | |
| Units | m_units |
| double | m_display_x_resolution |
| double | m_display_y_resolution |
| Paint::pointer | m_background |
| sigc::signal< void > | m_signal_size_changed |
| sigc::signal< void, Units > | m_signal_units |
| sigc::signal< void, double, double > | m_signal_display_resolution |
| sigc::signal< void, double, double > | m_signal_scrolled |
| sigc::signal< void, ScrollAnchor > | m_signal_scroll_anchor_changed |
| Papyrus::Canvas::Canvas | ( | const Glib::ustring & | id, | |
| double | width, | |||
| double | height, | |||
| double | scale | |||
| ) | [protected] |
| Papyrus::Canvas::~Canvas | ( | ) | [virtual] |
| Region Papyrus::Canvas::anchor_extents | ( | ) | const |
References m_height, m_scroll_anchor_offset_x, m_scroll_anchor_offset_y, m_width, and Papyrus::Region::set_lrtb().
| Paint::pointer Papyrus::Canvas::background | ( | ) | const |
References m_background.
| Matrix Papyrus::Canvas::calculate_composed_matrix | ( | ) | const [protected, virtual] |
Reimplemented from Papyrus::Drawable.
References Papyrus::Drawable::apply_external_matrices(), Papyrus::Drawable::centroid_x(), Papyrus::Drawable::centroid_y(), Papyrus::Drawable::get_rotation(), Papyrus::Drawable::get_scale_x(), Papyrus::Drawable::get_scale_y(), Papyrus::Drawable::get_skew_x(), Papyrus::Drawable::get_skew_y(), m_scroll_anchor_offset_x, m_scroll_anchor_offset_y, m_scroll_x, m_scroll_y, Papyrus::Matrix::rotate(), Papyrus::Matrix::scale(), Papyrus::Matrix::set_identity(), Papyrus::Matrix::skew(), Papyrus::Matrix::translate(), Papyrus::Drawable::x(), and Papyrus::Drawable::y().
Referenced by global_extents(), and global_matrix().
| void Papyrus::Canvas::canvas_to_window | ( | double & | x, | |
| double & | y | |||
| ) | const |
Convert canvas coordinates to window coordinates.
| [in] | x | The canvas x coordinate |
| [in] | y | The canvas y coordinate |
| [out] | x | The window x coordinate |
| [out] | y | The window y coordinate |
References Papyrus::Drawable::composed_matrix().
| Canvas::pointer Papyrus::Canvas::create | ( | const Glib::ustring & | id, | |
| double | width = 0.0, |
|||
| double | height = 0.0, |
|||
| double | scale = 1.0 | |||
| ) | [static] |
References PAPYRUS_CREATE.
| Canvas::pointer Papyrus::Canvas::create | ( | double | width = 0.0, |
|
| double | height = 0.0, |
|||
| double | scale = 1.0 | |||
| ) | [static] |
References PAPYRUS_CREATE.
Referenced by Papyrus::Gtk::LineJoinButtonBox::create_images(), Papyrus::Gtk::LineCapButtonBox::create_images(), Papyrus::Gtk::LineJoinComboBox::create_pixbufs(), Papyrus::Gtk::LineCapComboBox::create_pixbufs(), Papyrus::Gtk::MarkerComboBox::load_pixbufs(), Papyrus::Gtk::LineWidthComboBox::load_pixbufs(), and Papyrus::Gtk::Viewport::Viewport().
| void Papyrus::Canvas::device_resolution | ( | double & | x, | |
| double & | y | |||
| ) | const |
References m_display_x_resolution, and m_display_y_resolution.
| void Papyrus::Canvas::draw | ( | Context & | cairo | ) | const [protected, virtual] |
Reimplemented from Papyrus::Group.
References m_background, and Papyrus::Context::paint().
| Region Papyrus::Canvas::global_extents | ( | ) | const [virtual] |
Reimplemented from Papyrus::Drawable.
References calculate_composed_matrix(), Papyrus::Group::calculate_extents(), Papyrus::Drawable::global_matrix(), and Papyrus::Drawable::m_parent.
| Matrix Papyrus::Canvas::global_matrix | ( | ) | const [virtual] |
Reimplemented from Papyrus::Drawable.
References calculate_composed_matrix(), Papyrus::Drawable::global_matrix(), and Papyrus::Drawable::m_parent.
| double Papyrus::Canvas::height | ( | ) | const |
References m_height.
| Papyrus::Canvas::PAPYRUS_DRAWABLE | ( | Canvas | ) |
Reimplemented from Papyrus::Group.
| ScrollAnchor Papyrus::Canvas::scroll_anchor | ( | ) | const |
References m_scroll_anchor.
| void Papyrus::Canvas::scroll_anchor_offsets | ( | double & | x, | |
| double & | y | |||
| ) | const |
References m_scroll_anchor_offset_x, and m_scroll_anchor_offset_y.
| double Papyrus::Canvas::scroll_anchor_x_offset | ( | ) | const |
References m_scroll_anchor_offset_x.
| double Papyrus::Canvas::scroll_anchor_y_offset | ( | ) | const |
References m_scroll_anchor_offset_y.
| void Papyrus::Canvas::scroll_position | ( | double & | x, | |
| double & | y | |||
| ) | const |
References m_scroll_x, and m_scroll_y.
| void Papyrus::Canvas::scroll_to | ( | double | offset_x, | |
| double | offset_y | |||
| ) |
References Papyrus::Drawable::invalidate_composed_matrix(), m_scroll_x, m_scroll_y, m_signal_scrolled, and Papyrus::Drawable::redraw().
Referenced by scroll_to_center().
| void Papyrus::Canvas::scroll_to_center | ( | ) |
References scroll_to().
| void Papyrus::Canvas::scroll_to_x | ( | double | offset_x | ) |
| void Papyrus::Canvas::scroll_to_y | ( | double | offset_y | ) |
| double Papyrus::Canvas::scroll_x | ( | ) | const |
References m_scroll_x.
| double Papyrus::Canvas::scroll_y | ( | ) | const |
References m_scroll_y.
| Selection Papyrus::Canvas::select | ( | double | x, | |
| double | y, | |||
| unsigned | depth = 1 | |||
| ) | [virtual] |
Reimplemented from Papyrus::Group.
References Papyrus::Group::m_layers, and papyrus_dynamic_pointer_cast.
| void Papyrus::Canvas::set_background | ( | Paint::pointer | background | ) |
References m_background, and Papyrus::Drawable::redraw().
| bool Papyrus::Canvas::set_device_resolution | ( | double | x, | |
| double | y | |||
| ) |
| void Papyrus::Canvas::set_height | ( | double | height | ) |
| void Papyrus::Canvas::set_scroll_anchor | ( | ScrollAnchor | scroll_achor = SCROLL_ANCHOR_CENTER |
) |
| void Papyrus::Canvas::set_size | ( | double | width, | |
| double | height | |||
| ) |
| void Papyrus::Canvas::set_units | ( | Units | u | ) |
References Papyrus::Drawable::invalidate_extents(), m_signal_units, m_units, and Papyrus::Drawable::redraw().
| void Papyrus::Canvas::set_width | ( | double | width | ) |
| sigc::signal< void, double, double > Papyrus::Canvas::signal_display_resolution | ( | ) |
References m_signal_display_resolution.
| sigc::signal< void, ScrollAnchor > Papyrus::Canvas::signal_scroll_anchor_changed | ( | ) |
References m_signal_scroll_anchor_changed.
| sigc::signal< void, double, double > Papyrus::Canvas::signal_scrolled | ( | ) |
References m_signal_scrolled.
| sigc::signal< void > Papyrus::Canvas::signal_size_changed | ( | ) |
References m_signal_size_changed.
| sigc::signal< void, Units > Papyrus::Canvas::signal_units | ( | ) |
References m_signal_units.
| void Papyrus::Canvas::size | ( | double & | width, | |
| double & | height | |||
| ) | const |
| void Papyrus::Canvas::update_scroll_anchor_offsets | ( | ) | [protected] |
References m_height, m_scroll_anchor, m_scroll_anchor_offset_x, m_scroll_anchor_offset_y, m_width, Papyrus::SCROLL_ANCHOR_BOTTOM_LEFT, Papyrus::SCROLL_ANCHOR_BOTTOM_RIGHT, Papyrus::SCROLL_ANCHOR_CENTER, Papyrus::SCROLL_ANCHOR_TOP_LEFT, and Papyrus::SCROLL_ANCHOR_TOP_RIGHT.
Referenced by Canvas(), set_height(), set_size(), and set_width().
| double Papyrus::Canvas::width | ( | ) | const |
References m_width.
| void Papyrus::Canvas::window_to_canvas | ( | double & | x, | |
| double & | y | |||
| ) | const |
Convert window coordinates to canvas coordinates.
| [in] | x | The window x coordinate |
| [in] | y | The window y coordinate |
| [out] | x | The canvas x coordinate |
| [out] | y | The canvas y coordinate |
References Papyrus::Drawable::composed_matrix().
Paint::pointer Papyrus::Canvas::m_background [protected] |
Referenced by background(), draw(), and set_background().
double Papyrus::Canvas::m_display_x_resolution [protected] |
Referenced by device_resolution(), and set_device_resolution().
double Papyrus::Canvas::m_display_y_resolution [protected] |
Referenced by device_resolution(), and set_device_resolution().
double Papyrus::Canvas::m_height [protected] |
Referenced by anchor_extents(), height(), set_height(), set_size(), size(), and update_scroll_anchor_offsets().
double Papyrus::Canvas::m_scale [protected] |
Referenced by Canvas().
ScrollAnchor Papyrus::Canvas::m_scroll_anchor [protected] |
Determines the default scroll position and the result of scroll_to_center().
Referenced by scroll_anchor(), set_scroll_anchor(), and update_scroll_anchor_offsets().
double Papyrus::Canvas::m_scroll_anchor_offset_x [protected] |
Stores the default scroll anchor x offset.
Referenced by anchor_extents(), calculate_composed_matrix(), scroll_anchor_offsets(), scroll_anchor_x_offset(), and update_scroll_anchor_offsets().
double Papyrus::Canvas::m_scroll_anchor_offset_y [protected] |
Stores the default scroll anchor y offset.
Referenced by anchor_extents(), calculate_composed_matrix(), scroll_anchor_offsets(), scroll_anchor_y_offset(), and update_scroll_anchor_offsets().
double Papyrus::Canvas::m_scroll_x [protected] |
Stores the current scroll x offset.
Referenced by calculate_composed_matrix(), scroll_position(), scroll_to(), scroll_to_x(), scroll_to_y(), and scroll_x().
double Papyrus::Canvas::m_scroll_y [protected] |
Stores the current scroll y offset.
Referenced by calculate_composed_matrix(), scroll_position(), scroll_to(), scroll_to_x(), scroll_to_y(), and scroll_y().
sigc::signal<void,double,double> Papyrus::Canvas::m_signal_display_resolution [protected] |
Referenced by set_device_resolution(), and signal_display_resolution().
sigc::signal<void,ScrollAnchor> Papyrus::Canvas::m_signal_scroll_anchor_changed [protected] |
Referenced by set_scroll_anchor(), and signal_scroll_anchor_changed().
sigc::signal<void,double,double> Papyrus::Canvas::m_signal_scrolled [protected] |
Referenced by scroll_to(), scroll_to_x(), scroll_to_y(), and signal_scrolled().
sigc::signal<void> Papyrus::Canvas::m_signal_size_changed [protected] |
Referenced by set_height(), set_size(), set_width(), and signal_size_changed().
sigc::signal<void,Units> Papyrus::Canvas::m_signal_units [protected] |
Referenced by set_units(), and signal_units().
Units Papyrus::Canvas::m_units [protected] |
Referenced by set_units(), and units().
double Papyrus::Canvas::m_width [protected] |
Referenced by anchor_extents(), set_size(), set_width(), size(), update_scroll_anchor_offsets(), and width().
1.6.1