Inkscape
Vector Graphics Editor
|
Canvas Item for axonometric grids. More...
#include <canvas-item-grid.h>
Public Member Functions | |
CanvasItemGridAxonom (CanvasItemGroup *group) | |
========= Axonometric Grids ======== | |
void | set_angle_x (double value) |
void | set_angle_z (double value) |
![]() | |
CanvasItemGrid (CanvasItemGroup *group) | |
Create a null control grid. | |
bool | contains (Geom::Point const &p, double tolerance=0) override |
Returns true if point p (in canvas units) is within tolerance (canvas units) distance of grid. | |
void | set_major_color (uint32_t color) |
void | set_minor_color (uint32_t color) |
void | set_origin (Geom::Point const &point) |
void | set_spacing (Geom::Point const &point) |
void | set_dotted (bool b) |
void | set_major_line_interval (int n) |
void | set_no_emp_when_zoomed_out (bool noemp) |
![]() | |
CanvasItem (CanvasItemContext *context) | |
CanvasItem (CanvasItemGroup *parent) | |
CanvasItem (CanvasItem const &)=delete | |
CanvasItem & | operator= (CanvasItem const &)=delete |
void | unlink () |
UI::Widget::Canvas * | get_canvas () const |
CanvasItemGroup * | get_parent () const |
bool | is_descendant_of (CanvasItem const *ancestor) const |
void | set_z_position (int zpos) |
void | raise_to_top () |
void | lower_to_bottom () |
void | request_update () |
void | update (bool propagate) |
virtual void | visit_page_rects (std::function< void(Geom::Rect const &)> const &) const |
Geom::OptRect const & | get_bounds () const |
void | grab (EventMask event_mask, Glib::RefPtr< Gdk::Cursor > const &={}) |
void | ungrab () |
void | render (Inkscape::CanvasItemBuffer &buf) const |
bool | is_visible () const |
virtual void | set_visible (bool visible) |
void | request_redraw () |
virtual void | set_fill (uint32_t rgba) |
void | set_fill (CanvasItemColor color) |
void | set_fill_pattern (Cairo::RefPtr< Cairo::Pattern > pattern) |
virtual void | set_stroke (uint32_t rgba) |
void | set_stroke (CanvasItemColor color) |
void | set_stroke_width (double width) |
Set the stroke width. | |
void | set_outline (uint32_t color) |
Set the outline color. | |
void | set_outline_width (double width) |
Set the outline width. | |
double | get_effective_outline () const |
Get the effective outline. | |
void | set_name (std::string &&name) |
std::string const & | get_name () const |
void | update_canvas_item_ctrl_sizes (int size_index) |
void | set_pickable (bool pickable) |
bool | is_pickable () const |
sigc::connection | connect_event (sigc::slot< bool(CanvasEvent const &)> const &slot) |
virtual bool | handle_event (CanvasEvent const &event) |
void | canvas_item_print_tree (int level=0, int zorder=0) const |
Protected Member Functions | |
void | _update (bool propagate) override |
void | _render (CanvasItemBuffer &buf) const override |
This function calls Cairo to render a line on a particular canvas buffer. | |
![]() | |
~CanvasItemGrid () override=default | |
![]() | |
virtual | ~CanvasItem () |
Geom::Affine const & | affine () const |
virtual void | _mark_net_invisible () |
virtual void | _invalidate_ctrl_handles () |
template<typename F > | |
void | defer (F &&f) |
Protected Attributes | |
bool | scaled |
Whether the grid is in scaled mode. | |
double | angle_deg [3] |
Angle of each axis (note that angle[2] == 0) | |
double | angle_rad [3] |
Angle of each axis (note that angle[2] == 0) | |
double | tan_angle [3] |
tan(angle[. | |
double | lyw = 1.0 |
Transformed length y by the affine for the zoom. | |
double | lxw_x = 1.0 |
double | lxw_z = 1.0 |
double | spacing_ylines = 1.0 |
Geom::Point | ow |
Transformed origin by the affine for the zoom. | |
![]() | |
bool | _dotted |
Geom::Point | _origin |
Geom::Point | _spacing |
Spacing between elements of the grid. | |
int | _major_line_interval |
bool | _no_emp_when_zoomed_out |
uint32_t | _major_color |
uint32_t | _minor_color |
![]() | |
CanvasItemContext * | _context |
CanvasItemGroup * | _parent |
Geom::OptRect | _bounds |
bool | _need_update = false |
bool | _visible = true |
bool | _net_visible = true |
bool | _pickable = false |
uint32_t | _fill = CANVAS_ITEM_COLORS[CANVAS_ITEM_SECONDARY] |
Cairo::RefPtr< Cairo::Pattern > | _fill_pattern |
uint32_t | _stroke = CANVAS_ITEM_COLORS[CANVAS_ITEM_PRIMARY] |
double | _stroke_width = 1.0 |
uint32_t | _outline = 0x0 |
double | _outline_width = 0 |
std::string | _name |
sigc::signal< bool(CanvasEvent const &)> | _event_signal |
Friends | |
class | GridSnapperAxonom |
Additional Inherited Members | |
![]() | |
boost::intrusive::list_member_hook | member_hook |
Canvas Item for axonometric grids.
Definition at line 101 of file canvas-item-grid.h.
Inkscape::CanvasItemGridAxonom::CanvasItemGridAxonom | ( | Inkscape::CanvasItemGroup * | group | ) |
========= Axonometric Grids ========
Definition at line 320 of file canvas-item-grid.cpp.
References Inkscape::CanvasItem::_name, angle_deg, angle_rad, tan_angle, and Z.
|
overrideprotectedvirtual |
This function calls Cairo to render a line on a particular canvas buffer.
Coordinates are interpreted as SCREENcoordinates
Implements Inkscape::CanvasItem.
Definition at line 407 of file canvas-item-grid.cpp.
References Inkscape::CanvasItemGrid::_major_color, Inkscape::CanvasItemGrid::_major_line_interval, Inkscape::CanvasItemGrid::_minor_color, Inkscape::CanvasItemGrid::_no_emp_when_zoomed_out, Geom::are_near(), buf, Inkscape::drawline(), floor(), lxw_x, lxw_z, lyw, ow, scaled, spacing_ylines, tan_angle, Inkscape::vline(), Geom::X, Geom::Point::y(), and Z.
|
overrideprotectedvirtual |
Implements Inkscape::CanvasItem.
Definition at line 338 of file canvas-item-grid.cpp.
References Inkscape::CanvasItem::_bounds, Inkscape::CanvasItemGrid::_major_line_interval, Inkscape::CanvasItemGrid::_origin, Inkscape::CanvasItemGrid::_spacing, Inkscape::CanvasItem::affine(), Geom::are_near(), calculate_scaling_factor(), Geom::Affine::descrim(), Geom::infinity(), lxw_x, lxw_z, lyw, ow, Inkscape::CanvasItem::request_redraw(), scaled, spacing_ylines, tan_angle, Geom::Point::y(), and Z.
void Inkscape::CanvasItemGridAxonom::set_angle_x | ( | double | value | ) |
Definition at line 361 of file canvas-item-grid.cpp.
References angle_deg, angle_rad, Inkscape::CanvasItem::defer(), Inkscape::CanvasItem::request_update(), and tan_angle.
void Inkscape::CanvasItemGridAxonom::set_angle_z | ( | double | value | ) |
Definition at line 372 of file canvas-item-grid.cpp.
References angle_deg, angle_rad, Inkscape::CanvasItem::defer(), Inkscape::CanvasItem::request_update(), tan_angle, and Z.
|
friend |
Definition at line 111 of file canvas-item-grid.h.
|
protected |
Angle of each axis (note that angle[2] == 0)
Definition at line 118 of file canvas-item-grid.h.
Referenced by CanvasItemGridAxonom(), set_angle_x(), and set_angle_z().
|
protected |
Angle of each axis (note that angle[2] == 0)
Definition at line 119 of file canvas-item-grid.h.
Referenced by CanvasItemGridAxonom(), set_angle_x(), and set_angle_z().
|
protected |
Definition at line 123 of file canvas-item-grid.h.
|
protected |
Definition at line 124 of file canvas-item-grid.h.
|
protected |
Transformed length y by the affine for the zoom.
Definition at line 122 of file canvas-item-grid.h.
|
protected |
Transformed origin by the affine for the zoom.
Definition at line 127 of file canvas-item-grid.h.
|
protected |
Whether the grid is in scaled mode.
Definition at line 116 of file canvas-item-grid.h.
|
protected |
Definition at line 125 of file canvas-item-grid.h.
|
protected |
tan(angle[.
])
Definition at line 120 of file canvas-item-grid.h.
Referenced by _render(), _update(), CanvasItemGridAxonom(), set_angle_x(), and set_angle_z().