diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:50:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:50:49 +0000 |
commit | c853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch) | |
tree | 7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/print.h | |
parent | Initial commit. (diff) | |
download | inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.tar.xz inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.zip |
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/print.h')
-rw-r--r-- | src/print.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/print.h b/src/print.h new file mode 100644 index 0000000..275c079 --- /dev/null +++ b/src/print.h @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * TODO: insert short description here + *//* + * Authors: see git history + * + * Copyright (C) 2018 Authors + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ +#ifndef PRINT_H_INKSCAPE +#define PRINT_H_INKSCAPE + +/** \file + * Frontend to printing + */ +/* + * Author: + * Lauris Kaplinski <lauris@kaplinski.com> + * + * This code is in public domain + */ + +#include <2geom/forward.h> + +namespace Gtk { +class Window; +} + +class SPDocument; +class SPItem; +class SPStyle; + +namespace Inkscape { +namespace Extension { + +class Print; + +} // namespace Extension +} // namespace Inkscape + +struct SPPrintContext { + Inkscape::Extension::Print *module; + SPItem *context_item = nullptr; + + unsigned int bind(Geom::Affine const &transform, float opacity); + unsigned int release(); + 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 image_R8G8B8A8_N(unsigned char *px, unsigned int w, unsigned int h, unsigned int rs, + Geom::Affine const &transform, SPStyle const *style); + + unsigned int text(char const *text, Geom::Point p, + SPStyle const *style); + + void get_param(char *name, bool *value); + +}; + + +/* UI */ +void sp_print_document(Gtk::Window& parentWindow, SPDocument *doc); +void sp_print_document_to_file(SPDocument *doc, char const *filename); + + +#endif /* !PRINT_H_INKSCAPE */ + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |