Inkscape
Vector Graphics Editor
|
#include <export-preview.h>
Public Member Functions | |
ExportPreview ()=default | |
ExportPreview (BaseObjectType *cobj, Glib::RefPtr< Gtk::Builder > const &) | |
~ExportPreview () override | |
void | setDrawing (std::shared_ptr< PreviewDrawing > drawing) |
void | setItem (SPItem const *item, bool is_layer=false) |
void | setBox (Geom::Rect const &bbox) |
void | queueRefresh () |
void | resetPixels (bool new_size=false) |
void | setSize (int newSize) |
void | setPreview (Cairo::RefPtr< Cairo::ImageSurface >) |
Callback when the rendering is complete. | |
void | setBackgroundColor (std::uint32_t bg_color) |
Static Public Member Functions | |
static std::shared_ptr< Inkscape::Drawing > | makeDrawing (SPDocument *doc) |
Private Attributes | |
int | size = 128 |
sigc::connection | refresh_conn |
bool | _is_layer = false |
SPItem const * | _item = nullptr |
Geom::OptRect | _dbox |
std::shared_ptr< PreviewDrawing > | _drawing |
std::uint32_t | _bg_color = 0 |
sigc::scoped_connection | _render_idle |
Definition at line 54 of file export-preview.h.
|
default |
|
inline |
Definition at line 58 of file export-preview.h.
|
override |
Definition at line 136 of file export-preview.cpp.
References refresh_conn.
|
static |
void Inkscape::UI::Dialog::ExportPreview::queueRefresh | ( | ) |
Definition at line 168 of file export-preview.cpp.
References _bg_color, _dbox, _drawing, _is_layer, _item, _render_idle, and size.
Referenced by Inkscape::UI::Dialog::BatchItem::refresh(), and Inkscape::UI::Dialog::SingleExport::refreshPreview().
void Inkscape::UI::Dialog::ExportPreview::resetPixels | ( | bool | new_size = false | ) |
Definition at line 114 of file export-preview.cpp.
References Inkscape::IO::Resource::get_path(), and size.
Referenced by Inkscape::UI::Dialog::SingleExport::refreshPreview(), and setSize().
void Inkscape::UI::Dialog::ExportPreview::setBackgroundColor | ( | std::uint32_t | bg_color | ) |
Definition at line 189 of file export-preview.cpp.
References _bg_color.
Referenced by Inkscape::UI::Dialog::BatchItem::refresh(), and Inkscape::UI::Dialog::SingleExport::refreshPreview().
void Inkscape::UI::Dialog::ExportPreview::setBox | ( | Geom::Rect const & | bbox | ) |
Definition at line 148 of file export-preview.cpp.
References _dbox, _item, and Geom::Rect::hasZeroArea().
Referenced by Inkscape::UI::Dialog::BatchItem::refresh(), and Inkscape::UI::Dialog::SingleExport::refreshPreview().
void Inkscape::UI::Dialog::ExportPreview::setDrawing | ( | std::shared_ptr< PreviewDrawing > | drawing | ) |
Definition at line 157 of file export-preview.cpp.
References _drawing.
Referenced by Inkscape::UI::Dialog::BatchItem::init(), Inkscape::UI::Dialog::SingleExport::setDocument(), and Inkscape::UI::Dialog::BatchItem::setDrawing().
void Inkscape::UI::Dialog::ExportPreview::setItem | ( | SPItem const * | item, |
bool | is_layer = false |
||
) |
Definition at line 141 of file export-preview.cpp.
References _dbox, _is_layer, _item, Inkscape::is_layer(), and item.
Referenced by Inkscape::UI::Dialog::BatchItem::init(), and Inkscape::UI::Dialog::BatchItem::setIsolateItem().
void Inkscape::UI::Dialog::ExportPreview::setPreview | ( | Cairo::RefPtr< Cairo::ImageSurface > | surface | ) |
Callback when the rendering is complete.
Definition at line 181 of file export-preview.cpp.
References surface.
Referenced by Inkscape::UI::Dialog::PreviewDrawing::render().
void Inkscape::UI::Dialog::ExportPreview::setSize | ( | int | newSize | ) |
Definition at line 130 of file export-preview.cpp.
References resetPixels(), and size.
Referenced by Inkscape::UI::Dialog::BatchItem::init().
|
private |
Definition at line 82 of file export-preview.h.
Referenced by queueRefresh(), and setBackgroundColor().
|
private |
Definition at line 79 of file export-preview.h.
Referenced by queueRefresh(), setBox(), and setItem().
|
private |
Definition at line 81 of file export-preview.h.
Referenced by queueRefresh(), and setDrawing().
|
private |
Definition at line 77 of file export-preview.h.
Referenced by queueRefresh(), and setItem().
|
private |
Definition at line 78 of file export-preview.h.
Referenced by queueRefresh(), setBox(), and setItem().
|
private |
Definition at line 84 of file export-preview.h.
Referenced by queueRefresh().
|
private |
Definition at line 75 of file export-preview.h.
Referenced by ~ExportPreview().
|
private |
Definition at line 74 of file export-preview.h.
Referenced by queueRefresh(), resetPixels(), and setSize().