/*
5 * Authors: see git history
7 * Copyright (C) 2018 Authors
8 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
41 return module->bind(transform, opacity);
47 return module->release();
54 return module->fill(pathv, ctm, style, pbox, dbox, bbox);
61 return module->stroke(pathv, ctm, style, pbox, dbox, bbox);
68 return module->image(px, w, h, rs, transform, style);
74 return module->text(text, p, style);
89 Gtk::PrintOperation::Result res = printop.
run(Gtk::PrintOperation::Action::PRINT_DIALOG, parentWindow);
99 gchar
const *oldconst = mod->get_param_string(
"destination");
100 gchar *oldoutput = g_strdup(oldconst);
102 mod->set_param_string(
"destination", (gchar *)filename);
105 context.module = mod;
111 mod->root = (mod->base)->invoke_show(drawing, mod->dkey, SP_ITEM_SHOW_DISPLAY);
115 (mod->base)->invoke_print(&context);
118 (mod->base)->invoke_hide(mod->dkey);
123 mod->set_param_string(
"destination", oldoutput);
3x3 matrix representing an affine transformation.
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
void setRoot(DrawingItem *root)
Gtk::PrintOperation::Result run(Gtk::PrintOperation::Action, Gtk::Window &parent_window)
Typed SVG document implementation.
SPRoot * getRoot()
Returns our SPRoot.
int ensureUpToDate(unsigned int object_modified_tag=0)
Repeatedly works on getting the document updated, since sometimes it takes more than one pass to get ...
Base class for visual SVG elements.
static unsigned int display_key_new(unsigned numkeys)
Allocates unique integer keys.
vector< vpsc::Rectangle * > rs
Print * get_print(gchar const *key)
void sp_print_document_to_file(SPDocument *doc, gchar const *filename)
void sp_print_document(Gtk::Window &parentWindow, SPDocument *doc)
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
SPRoot: SVG <svg> implementation.
unsigned int bind(Geom::Affine const &transform, float opacity)
unsigned int image_R8G8B8A8_N(unsigned char *px, unsigned int w, unsigned int h, unsigned int rs, Geom::Affine const &transform, SPStyle const *style)
unsigned int fill(Geom::PathVector const &pathv, Geom::Affine const &ctm, SPStyle const *style, Geom::OptRect const &pbox, Geom::OptRect const &dbox, Geom::OptRect const &bbox)
unsigned int stroke(Geom::PathVector const &pathv, Geom::Affine const &ctm, SPStyle const *style, Geom::OptRect const &pbox, Geom::OptRect const &dbox, Geom::OptRect const &bbox)
unsigned int text(char const *text, Geom::Point p, SPStyle const *style)