Inkscape
Vector Graphics Editor
|
#include <stores.h>
Classes | |
struct | Store |
Public Types | |
enum class | Mode { None , Normal , Decoupled } |
enum class | Action { None , Recreated , Shifted } |
Public Member Functions | |
Stores (Prefs const &prefs) | |
Construct a blank object with no stores. | |
void | set_graphics (Graphics *g) |
Set the pointer to the graphics object. | |
void | reset () |
Discards all stores. (The actual operation on the graphics is performed on the next update().) | |
Action | update (Fragment const &view) |
Respond to a viewport change. (Requires a valid graphics.) | |
Action | finished_draw (Fragment const &view) |
Respond to drawing of the backing store having finished. (Requires a valid graphics.) | |
void | mark_drawn (Geom::IntRect const &rect) |
Record a rectangle as being drawn to the store. | |
Store const & | store () const |
Store const & | snapshot () const |
Mode | mode () const |
Private Member Functions | |
Geom::IntRect | centered (Fragment const &view) const |
void | recreate_store (Fragment const &view) |
void | shift_store (Fragment const &view) |
void | take_snapshot (Fragment const &view) |
void | snapshot_combine (Fragment const &view) |
Private Attributes | |
Mode | _mode |
Store | _store |
Store | _snapshot |
Graphics * | _graphics |
Prefs const & | _prefs |
|
strong |
|
strong |
|
inline |
|
private |
Definition at line 97 of file stores.cpp.
References _prefs, expandedBy(), Inkscape::UI::Widget::Prefs::padding, Inkscape::UI::Widget::Prefs::prerender, and Inkscape::UI::Widget::Fragment::rect.
Referenced by recreate_store(), and shift_store().
auto Inkscape::UI::Widget::Stores::finished_draw | ( | Fragment const & | view | ) |
Respond to drawing of the backing store having finished. (Requires a valid graphics.)
Definition at line 346 of file stores.cpp.
|
inline |
Record a rectangle as being drawn to the store.
Definition at line 68 of file stores.h.
References _store, Inkscape::UI::Widget::Stores::Store::drawn, and geom_to_cairo().
|
inline |
Definition at line 73 of file stores.h.
References _mode.
Referenced by Inkscape::UI::Widget::CairoGraphics::paint_widget().
|
private |
Definition at line 103 of file stores.cpp.
References _graphics, _store, Inkscape::UI::Widget::Fragment::affine, centered(), Geom::GenericRect< C >::dimensions(), Inkscape::UI::Widget::Stores::Store::drawn, Inkscape::UI::Widget::Graphics::recreate_store(), and Inkscape::UI::Widget::Fragment::rect.
Referenced by snapshot_combine(), and take_snapshot().
void Inkscape::UI::Widget::Stores::reset | ( | ) |
Discards all stores. (The actual operation on the graphics is performed on the next update().)
Definition at line 249 of file stores.cpp.
References _mode, _snapshot, _store, Inkscape::UI::Widget::Stores::Store::drawn, and None.
|
inline |
|
private |
Definition at line 113 of file stores.cpp.
References _graphics, _store, Inkscape::UI::Widget::Fragment::affine, centered(), Inkscape::UI::Widget::Stores::Store::drawn, geom_to_cairo(), Inkscape::UI::Widget::Fragment::rect, and Inkscape::UI::Widget::Graphics::shift_store().
|
inline |
Definition at line 72 of file stores.h.
References _snapshot.
Referenced by Inkscape::UI::Widget::CairoGraphics::fast_snapshot_combine(), Inkscape::UI::Widget::CairoGraphics::paint_widget(), and Inkscape::UI::Widget::CairoGraphics::snapshot_combine().
|
private |
Definition at line 137 of file stores.cpp.
References _graphics, _prefs, _snapshot, _store, Inkscape::UI::Widget::Fragment::affine, bounds, cairo_to_geom(), Inkscape::UI::Widget::Prefs::debug_logging, Geom::Affine::det(), Geom::GenericRect< C >::dimensions(), Inkscape::UI::Widget::Stores::Store::drawn, expandedBy(), Inkscape::UI::Widget::Graphics::fast_snapshot_combine(), Geom::Affine::inverse(), Geom::Scale::inverse(), Inkscape::UI::Widget::Graphics::is_opengl(), Geom::GenericRect< C >::midpoint(), Geom::GenericRect< C >::min(), Geom::ConvexHull::minAreaRotation(), paste(), Inkscape::UI::Widget::Prefs::prerender, recreate_store(), Inkscape::UI::Widget::Fragment::rect, Inkscape::Util::safeclamp(), Inkscape::UI::shrink, Inkscape::UI::Widget::shrink_region(), and Inkscape::UI::Widget::Graphics::snapshot_combine().
|
inline |
Definition at line 71 of file stores.h.
References _store.
Referenced by Inkscape::UI::Widget::CairoGraphics::draw_tile(), Inkscape::UI::Widget::CairoGraphics::fast_snapshot_combine(), Inkscape::UI::Widget::CairoGraphics::paint_widget(), Inkscape::UI::Widget::CairoGraphics::recreate_store(), Inkscape::UI::Widget::CairoGraphics::shift_store(), and Inkscape::UI::Widget::CairoGraphics::snapshot_combine().
|
private |
Definition at line 125 of file stores.cpp.
References _graphics, _snapshot, _store, Inkscape::UI::Widget::Fragment::affine, Inkscape::UI::Widget::Stores::Store::drawn, Geom::Affine::inverse(), recreate_store(), Inkscape::UI::Widget::Fragment::rect, Inkscape::UI::Widget::shrink_region(), and Inkscape::UI::Widget::Graphics::swap_stores().
auto Inkscape::UI::Widget::Stores::update | ( | Fragment const & | view | ) |
Respond to a viewport change. (Requires a valid graphics.)
Definition at line 257 of file stores.cpp.
References cairo_to_geom(), Geom::Parallelogram::contains(), expandedBy(), and result.
|
private |
Definition at line 81 of file stores.h.
Referenced by recreate_store(), set_graphics(), shift_store(), snapshot_combine(), and take_snapshot().
|
private |
|
private |
Definition at line 84 of file stores.h.
Referenced by centered(), and snapshot_combine().
|
private |
Definition at line 78 of file stores.h.
Referenced by reset(), snapshot(), snapshot_combine(), and take_snapshot().
|
private |
Definition at line 78 of file stores.h.
Referenced by mark_drawn(), recreate_store(), reset(), shift_store(), snapshot_combine(), store(), and take_snapshot().