summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/svg.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /src/extension/internal/svg.h
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/extension/internal/svg.h')
-rw-r--r--src/extension/internal/svg.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/extension/internal/svg.h b/src/extension/internal/svg.h
new file mode 100644
index 0000000..ec76bf0
--- /dev/null
+++ b/src/extension/internal/svg.h
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * This is the code that moves all of the SVG loading and saving into
+ * the module format. Really Sodipodi is built to handle these formats
+ * internally, so this is just calling those internal functions.
+ *
+ * Authors:
+ * Lauris Kaplinski <lauris@kaplinski.com>
+ * Ted Gould <ted@gould.cx>
+ *
+ * Copyright (C) 2002-2003 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef __SVG_H__
+#define __SVG_H__
+
+#include "../implementation/implementation.h"
+
+// clang-format off
+#define SVG_COMMON_INPUT_PARAMS \
+ "<param name='import_mode_svg' type='optiongroup' gui-text='" N_("SVG Image Import Type:") "' >\n" \
+ "<option value='include' >" N_("Include SVG image as editable object(s) in the current file") "</option>\n" \
+ "<option value='pages' >" N_("Add SVG as new page(s) in the current file") "</option>\n" \
+ "<option value='embed' >" N_("Embed the SVG file in an image tag (not editable in this document)") "</option>\n" \
+ "<option value='link' >" N_("Link the SVG file in an image tag (not editable in this document).") "</option>\n" \
+ "<option value='new' >" N_("Open SVG image as separate document") "</option>\n" \
+ "</param>\n" \
+ "<param name='svgdpi' type='float' precision='2' min='1' max='999999' gui-text='" N_("DPI for rendered SVG") "'>96.00</param>\n" \
+ "<param name='scale' appearance='combo' type='optiongroup' gui-text='" N_("Image Rendering Mode:") "' gui-description='" N_("When an image is upscaled, apply smoothing or keep blocky (pixelated). (Will not work in all browsers.)") "' >\n" \
+ "<option value='auto' >" N_("None (auto)") "</option>\n" \
+ "<option value='optimizeQuality' >" N_("Smooth (optimizeQuality)") "</option>\n" \
+ "<option value='optimizeSpeed' >" N_("Blocky (optimizeSpeed)") "</option>\n" \
+ "</param>\n" \
+ "<param name=\"do_not_ask\" gui-description='" N_("Hide the dialog next time and always apply the same actions.") "' gui-text=\"" N_("Don't ask again") "\" type=\"bool\" >false</param>\n"
+// clang-format on
+
+
+namespace Inkscape {
+namespace Extension {
+namespace Internal {
+
+class Svg : public Inkscape::Extension::Implementation::Implementation {
+ bool m_detachbase = false;
+
+public:
+ void setDetachBase(bool detach) override { m_detachbase = detach; }
+
+ void save( Inkscape::Extension::Output *mod,
+ SPDocument *doc,
+ gchar const *filename ) override;
+ SPDocument *open( Inkscape::Extension::Input *mod,
+ const gchar *uri ) override;
+ static void init( );
+
+};
+
+} } } /* namespace Inkscape, Extension, Implementation */
+#endif /* __SVG_H__ */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :