Inkscape
Vector Graphics Editor
|
#include <canvas-item-grid.h>
Public Member Functions | |
CanvasItemGridTiles (CanvasItemGroup *group) | |
void | set_gap_size (Geom::Point gap_size) |
void | set_margin_size (Geom::Point margin_size) |
![]() | |
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 |
![]() | |
~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 | |
Geom::Point | _world_origin |
Geom::Point | _world_pitch |
Geom::Point | _world_gap |
Geom::Point | _world_tile |
Geom::Point | _world_margin |
Geom::Point | _gap |
Geom::Point | _margin |
![]() | |
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 | GridSnapperXY |
Additional Inherited Members | |
![]() | |
boost::intrusive::list_member_hook | member_hook |
Definition at line 77 of file canvas-item-grid.h.
Inkscape::CanvasItemGridTiles::CanvasItemGridTiles | ( | Inkscape::CanvasItemGroup * | group | ) |
Definition at line 513 of file canvas-item-grid.cpp.
References Inkscape::CanvasItem::_name.
|
overrideprotectedvirtual |
Implements Inkscape::CanvasItem.
Definition at line 551 of file canvas-item-grid.cpp.
References Inkscape::CanvasItemGrid::_major_color, Inkscape::CanvasItemGrid::_minor_color, _world_gap, _world_margin, _world_origin, _world_pitch, _world_tile, buf, end, expandedBy(), floor(), height, Inkscape::size, SP_RGBA32_A_F(), SP_RGBA32_B_F(), SP_RGBA32_G_F(), SP_RGBA32_R_F(), start, width, Geom::Point::x(), and Geom::Point::y().
|
overrideprotectedvirtual |
Implements Inkscape::CanvasItem.
Definition at line 535 of file canvas-item-grid.cpp.
References Inkscape::CanvasItem::_bounds, _gap, _margin, Inkscape::CanvasItemGrid::_origin, Inkscape::CanvasItemGrid::_spacing, _world_gap, _world_margin, _world_origin, _world_pitch, _world_tile, Inkscape::CanvasItem::affine(), Geom::infinity(), Inkscape::CanvasItem::request_redraw(), and Geom::Affine::withoutTranslation().
void Inkscape::CanvasItemGridTiles::set_gap_size | ( | Geom::Point | gap_size | ) |
Definition at line 519 of file canvas-item-grid.cpp.
References _gap, Inkscape::CanvasItem::defer(), and Inkscape::CanvasItem::request_update().
void Inkscape::CanvasItemGridTiles::set_margin_size | ( | Geom::Point | margin_size | ) |
Definition at line 527 of file canvas-item-grid.cpp.
References _margin, Inkscape::CanvasItem::defer(), and Inkscape::CanvasItem::request_update().
|
friend |
Definition at line 85 of file canvas-item-grid.h.
|
protected |
Definition at line 96 of file canvas-item-grid.h.
Referenced by _update(), and set_gap_size().
|
protected |
Definition at line 97 of file canvas-item-grid.h.
Referenced by _update(), and set_margin_size().
|
protected |
Definition at line 92 of file canvas-item-grid.h.
|
protected |
Definition at line 94 of file canvas-item-grid.h.
|
protected |
Definition at line 90 of file canvas-item-grid.h.
|
protected |
Definition at line 91 of file canvas-item-grid.h.
|
protected |
Definition at line 93 of file canvas-item-grid.h.