32 g_warning(
"Template type should provide height and width params!");
71 auto nv = doc->getNamedView();
75 nv->setAttribute(
"inkscape:document-units", unit->abbr);
76 doc->setDocumentScale(1.0);
Two-dimensional point that doubles as a vector.
char const * get_param_optiongroup(char const *name, char const *alt) const
Like get_param_optiongroup but with a default on param_not_exist error.
double get_param_float(char const *name) const
Gets a float parameter identified by name with the double placed in value.
char const * get_param_string(char const *name, char const *alt) const
Like get_param_string but with a default on param_not_exist error.
void resize_to_template(Inkscape::Extension::Template *tmod, SPDocument *doc, SPPage *page) override
std::unique_ptr< SPDocument > new_from_template(Inkscape::Extension::Template *tmod) override
virtual Geom::Point get_template_size(Inkscape::Extension::Template *tmod) const
Return the width and height of the new page, the default is a fixed orientation.
bool match_template_size(Inkscape::Extension::Template *tmod, double width, double height) override
virtual const Util::Unit * get_template_unit(Inkscape::Extension::Template *tmod) const
Return the unit the size is given in.
std::unique_ptr< SPDocument > get_template_document() const
Get the raw document svg for this template (pre-processing).
void resizePage(double width, double height)
double value(Unit const *u) const
Return the quantity's value in the specified unit.
Unit const * getUnit(Glib::ustring const &name) const
Retrieve a given unit based on its string identifier.
Typed SVG document implementation.
Inkscape::PageManager & getPageManager()
A way to clear the N_ macro, which is defined as an inline function.
Parameters for extensions.
bool are_near(Affine const &a1, Affine const &a2, Coord eps=EPSILON)