Inkscape
Vector Graphics Editor
|
#include <metafile-print.h>
Classes | |
struct | GRADVALUES |
Public Member Functions | |
PrintMetafile ()=default | |
~PrintMetafile () override | |
bool | textToPath (Inkscape::Extension::Print *ext) override |
Tell the printing engine whether text should be text or path. | |
unsigned int | bind (Inkscape::Extension::Print *module, Geom::Affine const &transform, float opacity) override |
unsigned int | release (Inkscape::Extension::Print *module) override |
![]() | |
Implementation ()=default | |
virtual | ~Implementation ()=default |
virtual bool | load (Inkscape::Extension::Extension *) |
virtual void | unload (Inkscape::Extension::Extension *) |
virtual ImplementationDocumentCache * | newDocCache (Inkscape::Extension::Extension *, SPDesktop *) |
Create a new document cache object. | |
virtual bool | check (Inkscape::Extension::Extension *) |
Verify any dependencies. | |
virtual bool | cancelProcessing () |
virtual void | commitDocument () |
virtual std::unique_ptr< SPDocument > | new_from_template (Inkscape::Extension::Template *) |
virtual void | get_template_presets (const Template *tmod, TemplatePresets &presets) const |
virtual void | resize_to_template (Inkscape::Extension::Template *tmod, SPDocument *doc, SPPage *page) |
virtual bool | match_template_size (Inkscape::Extension::Template *tmod, double width, double height) |
virtual std::unique_ptr< SPDocument > | open (Inkscape::Extension::Input *module, char const *filename, bool is_importing) |
Open a file. | |
virtual void | save (Inkscape::Extension::Output *, SPDocument *, gchar const *) |
Find out information about the file. | |
virtual void | export_raster (Inkscape::Extension::Output *module, const SPDocument *doc, std::string const &png_file, gchar const *filename) |
Convert from PNG to raster format. | |
virtual Gtk::Widget * | prefs_effect (Inkscape::Extension::Effect *module, SPDesktop *desktop, sigc::signal< void()> *changeSignal, ImplementationDocumentCache *docCache) |
Find out information about the file. | |
virtual void | effect (Inkscape::Extension::Effect *, ExecutionEnv *, SPDesktop *, ImplementationDocumentCache *) |
virtual void | effect (Inkscape::Extension::Effect *, ExecutionEnv *, SPDocument *document) |
virtual bool | apply_filter (Inkscape::Extension::Effect *module, SPItem *item) |
virtual unsigned | setup (Inkscape::Extension::Print *) |
virtual unsigned | set_preview (Inkscape::Extension::Print *) |
virtual unsigned | begin (Inkscape::Extension::Print *, SPDocument *) |
virtual unsigned | finish (Inkscape::Extension::Print *) |
virtual bool | fontEmbedded (Inkscape::Extension::Print *) |
Get "fontEmbedded" param, i.e. | |
virtual unsigned | fill (Inkscape::Extension::Print *, Geom::PathVector const &, Geom::Affine const &, SPStyle const *, Geom::OptRect const &, Geom::OptRect const &, Geom::OptRect const &) |
virtual unsigned | stroke (Inkscape::Extension::Print *, Geom::PathVector const &, Geom::Affine const &, SPStyle const *, Geom::OptRect const &, Geom::OptRect const &, Geom::OptRect const &) |
virtual unsigned | image (Inkscape::Extension::Print *, unsigned char *, unsigned int, unsigned int, unsigned int, Geom::Affine const &, SPStyle const *) |
virtual unsigned | text (Inkscape::Extension::Print *, char const *, Geom::Point const &, SPStyle const *) |
virtual void | processPath (Inkscape::XML::Node *) |
virtual void | setDetachBase (bool detach) |
If detach = true, when saving to a file, don't store URIs relative to the filename. | |
Protected Member Functions | |
U_COLORREF | avg_stop_color (SPGradient *gr) |
U_COLORREF | weight_opacity (U_COLORREF c1) |
U_COLORREF | weight_colors (U_COLORREF c1, U_COLORREF c2, double t) |
void | hatch_classify (char *name, int *hatchType, U_COLORREF *hatchColor, U_COLORREF *bkColor) |
void | brush_classify (SPObject *parent, int depth, Inkscape::Pixbuf const **epixbuf, int *hatchType, U_COLORREF *hatchColor, U_COLORREF *bkColor) |
int | hold_gradient (void *gr, int mode) |
virtual int | create_brush (SPStyle const *style, PU_COLORREF fcolor)=0 |
virtual void | destroy_brush ()=0 |
virtual int | create_pen (SPStyle const *style, const Geom::Affine &transform)=0 |
virtual void | destroy_pen ()=0 |
Static Protected Member Functions | |
static void | _lookup_ppt_fontfix (Glib::ustring const &fontname, FontfixParams &) |
static U_COLORREF | _gethexcolor (uint32_t color) |
static uint32_t | _translate_weight (unsigned inkweight) |
static void | swapRBinRGBA (char *px, int pixels) |
static int | snprintf_dots (char *s, size_t n, const char *format,...) |
static Geom::PathVector | center_ellipse_as_SVG_PathV (Geom::Point ctr, double rx, double ry, double F) |
static Geom::PathVector | center_elliptical_ring_as_SVG_PathV (Geom::Point ctr, double rx1, double ry1, double rx2, double ry2, double F) |
static Geom::PathVector | center_elliptical_hole_as_SVG_PathV (Geom::Point ctr, double rx, double ry, double F) |
static Geom::PathVector | rect_cutter (Geom::Point ctr, Geom::Point pos, Geom::Point neg, Geom::Point width) |
static FillRule | SPWR_to_LVFR (SPWindRule wr) |
Protected Attributes | |
double | _width |
double | _height |
double | _doc_unit_scale |
U_RECTL | rc |
uint32_t | htextalignment |
uint32_t | hpolyfillmode |
std::optional< Inkscape::Colors::Color > | htextcolor_rgb |
std::stack< Geom::Affine > | m_tr_stack |
Geom::PathVector | fill_pathv |
Geom::Affine | fill_transform |
bool | use_stroke |
bool | use_fill |
bool | simple_shape |
bool | usebk |
GRADVALUES | gv |
Definition at line 47 of file metafile-print.h.
|
default |
|
overridedefault |
|
staticprotected |
Definition at line 110 of file metafile-print.cpp.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), and hatch_classify().
|
staticprotected |
Definition at line 101 of file metafile-print.cpp.
References Inkscape::Extension::Internal::get_ppt_fixable_fonts().
Referenced by Inkscape::Extension::Internal::PrintEmf::text(), and Inkscape::Extension::Internal::PrintWmf::text().
|
staticprotected |
Definition at line 122 of file metafile-print.cpp.
References SP_CSS_FONT_WEIGHT_100, SP_CSS_FONT_WEIGHT_200, SP_CSS_FONT_WEIGHT_300, SP_CSS_FONT_WEIGHT_400, SP_CSS_FONT_WEIGHT_500, SP_CSS_FONT_WEIGHT_600, SP_CSS_FONT_WEIGHT_700, SP_CSS_FONT_WEIGHT_800, and SP_CSS_FONT_WEIGHT_900.
Referenced by Inkscape::Extension::Internal::PrintEmf::text(), and Inkscape::Extension::Internal::PrintWmf::text().
|
protected |
Definition at line 145 of file metafile-print.cpp.
References gv, Inkscape::Extension::Internal::opweight(), Inkscape::Colors::Space::RGB, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::rgb, SPGradientVector::stops, and SPGradient::vector.
Referenced by Inkscape::Extension::Internal::PrintEmf::create_brush(), Inkscape::Extension::Internal::PrintWmf::create_brush(), and Inkscape::Extension::Internal::PrintEmf::create_pen().
|
overridevirtual |
Reimplemented from Inkscape::Extension::Implementation::Implementation.
Definition at line 82 of file metafile-print.cpp.
References m_tr_stack.
|
protected |
Definition at line 248 of file metafile-print.cpp.
References brush_classify(), child, hatch_classify(), and parent.
Referenced by brush_classify(), Inkscape::Extension::Internal::PrintEmf::create_brush(), Inkscape::Extension::Internal::PrintWmf::create_brush(), and Inkscape::Extension::Internal::PrintEmf::create_pen().
|
staticprotected |
Definition at line 353 of file metafile-print.cpp.
References Geom::parse_svg_path(), Inkscape::Extension::Implementation::Implementation::text(), Geom::X, and Geom::Y.
|
staticprotected |
Definition at line 404 of file metafile-print.cpp.
References Geom::parse_svg_path(), Inkscape::Extension::Implementation::Implementation::text(), Geom::X, and Geom::Y.
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), and Inkscape::Extension::Internal::PrintWmf::fill().
|
staticprotected |
Definition at line 376 of file metafile-print.cpp.
References Geom::parse_svg_path(), Inkscape::Extension::Implementation::Implementation::text(), Geom::X, and Geom::Y.
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), and Inkscape::Extension::Internal::PrintWmf::fill().
|
protectedpure virtual |
Implemented in Inkscape::Extension::Internal::PrintEmf, and Inkscape::Extension::Internal::PrintWmf.
|
protectedpure virtual |
Implemented in Inkscape::Extension::Internal::PrintEmf, and Inkscape::Extension::Internal::PrintWmf.
|
protectedpure virtual |
Implemented in Inkscape::Extension::Internal::PrintEmf, and Inkscape::Extension::Internal::PrintWmf.
|
protectedpure virtual |
Implemented in Inkscape::Extension::Internal::PrintEmf, and Inkscape::Extension::Internal::PrintWmf.
|
protected |
Definition at line 203 of file metafile-print.cpp.
References _gethexcolor(), name, and usebk.
Referenced by brush_classify().
|
protected |
Definition at line 300 of file metafile-print.cpp.
References SVGLength::computed, SPRadialGradient::cx, SPRadialGradient::cy, Inkscape::Extension::Internal::DRAW_LINEAR_GRADIENT, Inkscape::Extension::Internal::DRAW_RADIAL_GRADIENT, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::grad, SPGradient::gradientTransform, SPGradient::gradientTransform_set, gv, mode, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::mode, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::p1, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::p2, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::p3, Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::r, SPRadialGradient::r, SPLinearGradient::x1, SPLinearGradient::x2, SPLinearGradient::y1, and SPLinearGradient::y2.
Referenced by Inkscape::Extension::Internal::PrintEmf::create_brush(), and Inkscape::Extension::Internal::PrintWmf::create_brush().
|
staticprotected |
Definition at line 429 of file metafile-print.cpp.
References Geom::Path::appendNew(), Geom::Path::close(), Geom::PathVector::push_back(), Geom::Path::start(), and width.
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), and Inkscape::Extension::Internal::PrintWmf::fill().
|
overridevirtual |
Reimplemented from Inkscape::Extension::Implementation::Implementation.
Definition at line 94 of file metafile-print.cpp.
References m_tr_stack.
|
staticprotected |
|
staticprotected |
Definition at line 445 of file metafile-print.cpp.
References fill_nonZero, fill_oddEven, and SP_WIND_RULE_EVENODD.
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), and Inkscape::Extension::Internal::PrintWmf::fill().
|
staticprotected |
Definition at line 290 of file metafile-print.cpp.
Referenced by Inkscape::Extension::Internal::PrintEmf::create_brush(), Inkscape::Extension::Internal::PrintWmf::create_brush(), and Inkscape::Extension::Internal::PrintEmf::create_pen().
|
overridevirtual |
Tell the printing engine whether text should be text or path.
Default value is false because most printing engines will support paths more than they'll support text. (at least they do today)
true | Render the text as a path |
false | Render text using the text function (above) |
Reimplemented from Inkscape::Extension::Implementation::Implementation.
Definition at line 77 of file metafile-print.cpp.
References Inkscape::Extension::Extension::get_param_bool().
|
protected |
Definition at line 177 of file metafile-print.cpp.
References U_COLORREF::Blue, U_COLORREF::Green, U_COLORREF::Red, U_COLORREF::Reserved, result, and weight_opacity().
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), and Inkscape::Extension::Internal::PrintWmf::fill().
|
protected |
Definition at line 165 of file metafile-print.cpp.
References U_COLORREF::Blue, U_COLORREF::Green, gv, Inkscape::Extension::Internal::opweight(), U_COLORREF::Red, U_COLORREF::Reserved, result, and Inkscape::Extension::Internal::PrintMetafile::GRADVALUES::rgb.
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), and weight_colors().
|
protected |
Definition at line 72 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), and Inkscape::Extension::Internal::PrintEmf::do_clip_if_present().
|
protected |
Definition at line 71 of file metafile-print.h.
|
protected |
Definition at line 70 of file metafile-print.h.
|
protected |
Definition at line 81 of file metafile-print.h.
|
protected |
Definition at line 82 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::fill(), and Inkscape::Extension::Internal::PrintWmf::fill().
|
protected |
Definition at line 88 of file metafile-print.h.
Referenced by avg_stop_color(), Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), hold_gradient(), and weight_opacity().
|
protected |
|
protected |
Definition at line 76 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::Extension::Internal::PrintEmf::text(), and Inkscape::Extension::Internal::PrintWmf::text().
|
protected |
Definition at line 78 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::Extension::Internal::PrintEmf::text(), and Inkscape::Extension::Internal::PrintWmf::text().
|
protected |
Definition at line 80 of file metafile-print.h.
Referenced by bind(), Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), Inkscape::Extension::Internal::PrintEmf::image(), Inkscape::Extension::Internal::PrintWmf::image(), release(), Inkscape::Extension::Internal::PrintEmf::stroke(), Inkscape::Extension::Internal::PrintWmf::stroke(), Inkscape::Extension::Internal::PrintEmf::text(), and Inkscape::Extension::Internal::PrintWmf::text().
|
protected |
Definition at line 74 of file metafile-print.h.
|
protected |
|
protected |
Definition at line 84 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), Inkscape::Extension::Internal::PrintEmf::print_pathv(), Inkscape::Extension::Internal::PrintWmf::print_pathv(), Inkscape::Extension::Internal::PrintEmf::print_simple_shape(), Inkscape::Extension::Internal::PrintEmf::stroke(), and Inkscape::Extension::Internal::PrintWmf::stroke().
|
protected |
Definition at line 83 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), Inkscape::Extension::Internal::PrintEmf::print_pathv(), Inkscape::Extension::Internal::PrintWmf::print_pathv(), Inkscape::Extension::Internal::PrintEmf::print_simple_shape(), Inkscape::Extension::Internal::PrintEmf::stroke(), and Inkscape::Extension::Internal::PrintWmf::stroke().
|
protected |
Definition at line 86 of file metafile-print.h.
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::Extension::Internal::PrintEmf::create_brush(), Inkscape::Extension::Internal::PrintWmf::create_brush(), Inkscape::Extension::Internal::PrintEmf::create_pen(), hatch_classify(), Inkscape::Extension::Internal::PrintEmf::stroke(), and Inkscape::Extension::Internal::PrintWmf::stroke().