Inkscape
Vector Graphics Editor
|
#include <canvas-page.h>
Public Member Functions | |
CanvasPage () | |
~CanvasPage () | |
void | update (Geom::Rect size, Geom::OptRect margin, Geom::OptRect bleed, const char *txt, bool outline, bool is_yaxisdown) |
Update the visual representation of a page on screen. | |
void | add (Geom::Rect size, CanvasItemGroup *background_group, CanvasItemGroup *foreground_group) |
Add the page canvas to the given canvas item groups (canvas view is implicit) | |
void | remove (UI::Widget::Canvas *canvas) |
Hide the page in the given canvas widget. | |
void | show () |
void | hide () |
void | set_guides_visible (bool show) |
bool | setOnTop (bool on_top) |
bool | setShadow (int shadow) |
bool | setPageColor (Color const &border, Color const &bg, Color const &canvas, Color const &margin, Color const &bleed) |
bool | setLabelStyle (const std::string &style) |
Public Attributes | |
bool | is_selected = false |
Private Member Functions | |
void | _updateTextItem (CanvasItemText *label, Geom::Rect page, std::string txt, bool is_yaxisdown) |
Update the page's textual label. | |
Private Attributes | |
std::vector< CanvasItemPtr< CanvasItem > > | canvas_items |
int | _shadow_size = 0 |
bool | _border_on_top = true |
Color | _background_color {0xffffffff} |
Color | _border_color {0x00000040} |
Color | _canvas_color {0xffffffff} |
Color | _margin_color {0x1699d771} |
Color | _bleed_color {0xbe310e62} |
std::string | _label_style = "default" |
Definition at line 30 of file canvas-page.h.
|
default |
|
default |
References add().
|
private |
Update the page's textual label.
Definition at line 188 of file canvas-page.cpp.
References _canvas_color, _label_style, Inkscape::Colors::get_perceptual_lightness(), is_selected, label, and page.
Referenced by update().
void Inkscape::CanvasPage::add | ( | Geom::Rect | size, |
CanvasItemGroup * | background_group, | ||
CanvasItemGroup * | foreground_group | ||
) |
Add the page canvas to the given canvas item groups (canvas view is implicit)
Definition at line 26 of file canvas-page.cpp.
References _bleed_color, _margin_color, canvas_items, item, label, Inkscape::size, and Inkscape::Colors::Color::toRGBA().
Referenced by SPPage::showPage(), and ~CanvasPage().
void Inkscape::CanvasPage::hide | ( | ) |
Definition at line 88 of file canvas-page.cpp.
References canvas_items, and item.
Referenced by SPPage::hidePage(), and SPNamedView::SPNamedView().
void Inkscape::CanvasPage::remove | ( | UI::Widget::Canvas * | canvas | ) |
Hide the page in the given canvas widget.
Definition at line 69 of file canvas-page.cpp.
References canvas_items.
Referenced by SPPage::hidePage().
void Inkscape::CanvasPage::set_guides_visible | ( | bool | show | ) |
Definition at line 95 of file canvas-page.cpp.
References canvas_items, item, and show().
Referenced by SPPage::set_guides_visible().
bool Inkscape::CanvasPage::setLabelStyle | ( | const std::string & | style | ) |
Definition at line 260 of file canvas-page.cpp.
References _label_style.
bool Inkscape::CanvasPage::setOnTop | ( | bool | on_top | ) |
Definition at line 229 of file canvas-page.cpp.
References _border_on_top.
bool Inkscape::CanvasPage::setPageColor | ( | Color const & | border, |
Color const & | bg, | ||
Color const & | canvas, | ||
Color const & | margin, | ||
Color const & | bleed | ||
) |
Definition at line 247 of file canvas-page.cpp.
References _background_color, _bleed_color, _border_color, _canvas_color, _margin_color, border, and margin.
bool Inkscape::CanvasPage::setShadow | ( | int | shadow | ) |
Definition at line 238 of file canvas-page.cpp.
References _shadow_size.
void Inkscape::CanvasPage::show | ( | ) |
Definition at line 81 of file canvas-page.cpp.
References canvas_items, and item.
Referenced by set_guides_visible(), and SPPage::showPage().
void Inkscape::CanvasPage::update | ( | Geom::Rect | size, |
Geom::OptRect | margin, | ||
Geom::OptRect | bleed, | ||
const char * | txt, | ||
bool | outline, | ||
bool | is_yaxisdown | ||
) |
Update the visual representation of a page on screen.
size | - The size of the page in desktop units |
txt | - An optional label for the page |
outline | - Disable normal rendering and show as an outline. |
Definition at line 110 of file canvas-page.cpp.
References _background_color, _bleed_color, _border_color, _border_on_top, _margin_color, _shadow_size, _updateTextItem(), canvas_items, is_selected, item, label, margin, Inkscape::outline(), Inkscape::size, and Inkscape::Colors::Color::toRGBA().
Referenced by SPPage::update().
|
private |
Definition at line 59 of file canvas-page.h.
Referenced by setPageColor(), and update().
|
private |
Definition at line 63 of file canvas-page.h.
Referenced by add(), setPageColor(), and update().
|
private |
Definition at line 60 of file canvas-page.h.
Referenced by setPageColor(), and update().
|
private |
Definition at line 58 of file canvas-page.h.
Referenced by setOnTop(), and update().
|
private |
Definition at line 61 of file canvas-page.h.
Referenced by _updateTextItem(), and setPageColor().
|
private |
Definition at line 65 of file canvas-page.h.
Referenced by _updateTextItem(), and setLabelStyle().
|
private |
Definition at line 62 of file canvas-page.h.
Referenced by add(), setPageColor(), and update().
|
private |
Definition at line 57 of file canvas-page.h.
Referenced by setShadow(), and update().
|
private |
Definition at line 55 of file canvas-page.h.
Referenced by add(), hide(), remove(), set_guides_visible(), show(), and update().
bool Inkscape::CanvasPage::is_selected = false |
Definition at line 48 of file canvas-page.h.
Referenced by _updateTextItem(), SPPage::setSelected(), and update().