Inkscape
Vector Graphics Editor
|
#include <metafile-inout.h>
Public Member Functions | |
Metafile ()=default | |
~Metafile () 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 | textToPath (Inkscape::Extension::Print *) |
Tell the printing engine whether text should be text or path. | |
virtual bool | fontEmbedded (Inkscape::Extension::Print *) |
Get "fontEmbedded" param, i.e. | |
virtual unsigned | bind (Inkscape::Extension::Print *, Geom::Affine const &, float) |
virtual unsigned | release (Inkscape::Extension::Print *) |
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. | |
Static Protected Member Functions | |
static uint32_t | sethexcolor (U_COLORREF color) |
static pixel_t * | pixel_at (bitmap_t *bitmap, int x, int y) |
Construct a PNG in memory from an RGB from the EMF file. | |
static void | my_png_write_data (png_structp png_ptr, png_bytep data, png_size_t length) |
static void | toPNG (PMEMPNG accum, int width, int height, const char *px) |
static gchar * | bad_image_png () |
static void | setViewBoxIfMissing (SPDocument *doc) |
static int | combine_ops_to_livarot (const int op) |
Definition at line 69 of file metafile-inout.h.
|
default |
|
override |
Definition at line 37 of file metafile-inout.cpp.
|
staticprotected |
Definition at line 272 of file metafile-inout.cpp.
Referenced by Inkscape::Extension::Internal::Wmf::add_bm16_image(), Inkscape::Extension::Internal::Wmf::add_dib_image(), Inkscape::Extension::Internal::Emf::add_image(), Inkscape::Extension::Internal::Wmf::common_bm16_to_image(), Inkscape::Extension::Internal::Wmf::common_dib_to_image(), and Inkscape::Extension::Internal::Emf::common_image_extraction().
|
staticprotected |
Definition at line 234 of file metafile-inout.cpp.
References bool_op_diff, bool_op_inters, bool_op_symdiff, and bool_op_union.
Referenced by Inkscape::Extension::Internal::Emf::add_clips(), and Inkscape::Extension::Internal::Wmf::add_clips().
|
staticprotected |
Definition at line 74 of file metafile-inout.cpp.
References Inkscape::Extension::Internal::MEMPNG::buffer, data, and Inkscape::Extension::Internal::MEMPNG::size.
Referenced by toPNG().
|
staticprotected |
Construct a PNG in memory from an RGB from the EMF file.
from: http://www.lemoda.net/c/write-png/
which was based on: http://stackoverflow.com/questions/1821806/how-to-encode-png-to-buffer-using-libpng
gcc -Wall -o testpng testpng.c -lpng
Originally here, but moved up
#include <png.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h>
Definition at line 64 of file metafile-inout.cpp.
References Inkscape::Extension::Internal::bitmap_t::pixels, and Inkscape::Extension::Internal::bitmap_t::width.
Referenced by toPNG().
|
staticprotected |
Definition at line 259 of file metafile-inout.cpp.
Referenced by Inkscape::Extension::Internal::Emf::add_gradient(), Inkscape::Extension::Internal::Emf::add_hatch(), Inkscape::Extension::Internal::Wmf::add_hatch(), and Inkscape::Extension::Internal::Emf::myEnhMetaFileProc().
|
staticprotected |
Definition at line 178 of file metafile-inout.cpp.
References Inkscape::Util::Unit::abbr, Inkscape::UI::ShapeEditor::blockSetItem(), Inkscape::Util::Quantity::convert(), SPDocument::ensureUpToDate(), Geom::GenericRect< Coord >::from_xywh(), Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), SPDocument::getHeight(), SPDocument::getNamedView(), SPObject::getRepr(), SPDocument::getRoot(), SPDocument::getWidth(), scale, SPGroup::scaleChildItemsRec(), Inkscape::XML::Node::setAttribute(), Inkscape::Preferences::setBool(), SPDocument::setViewBox(), Inkscape::SVGOStringStream::str(), Inkscape::Util::Quantity::unit, Inkscape::Util::Quantity::value(), and SPViewBox::viewBox_set.
|
staticprotected |
Definition at line 91 of file metafile-inout.cpp.
References Inkscape::Extension::Internal::pixel_t::blue, Inkscape::Extension::Internal::MEMPNG::buffer, Inkscape::Extension::Internal::pixel_t::green, height, Inkscape::Extension::Internal::bitmap_t::height, my_png_write_data(), pixel_at(), Inkscape::Extension::Internal::bitmap_t::pixels, Inkscape::Extension::Internal::pixel_t::red, Inkscape::Extension::Internal::MEMPNG::size, width, and Inkscape::Extension::Internal::bitmap_t::width.
Referenced by Inkscape::Extension::Internal::Wmf::add_bm16_image(), Inkscape::Extension::Internal::Wmf::add_dib_image(), Inkscape::Extension::Internal::Emf::add_image(), Inkscape::Extension::Internal::Wmf::common_bm16_to_image(), Inkscape::Extension::Internal::Wmf::common_dib_to_image(), and Inkscape::Extension::Internal::Emf::common_image_extraction().