Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgSavingContext.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2011 Jan Hambrecht <jaham@gmx.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef SVGSAVINGCONTEXT_H
8#define SVGSAVINGCONTEXT_H
9
10#include <QtGlobal>
11
12class KoXmlWriter;
13class KoShape;
14class QIODevice;
15class QString;
16class QTransform;
17class QImage;
18
19#include "kritaflake_export.h"
20
22class KRITAFLAKE_EXPORT SvgSavingContext
23{
24public:
26 explicit SvgSavingContext(QIODevice &outputDevice, bool saveInlineImages = true);
27 explicit SvgSavingContext(QIODevice &shapesDevice, QIODevice &styleDevice, bool saveInlineImages = true);
28
30 virtual ~SvgSavingContext();
31
34
37
39 QString createUID(const QString &base);
40
42 QString getID(const KoShape *obj);
43
45 QTransform userSpaceTransform() const;
46
48 bool isSavingInlineImages() const;
49
51 QString createFileName(const QString &extension);
52
54 QString saveImage(const QImage &image);
55
56 void setStrippedTextMode(bool value);
57 bool strippedTextMode() const;
58
59private:
60 Q_DISABLE_COPY(SvgSavingContext)
61
62private:
63 class Private;
64 Private * const d;
65};
66
67#endif // SVGSAVINGCONTEXT_H
float value(const T *src, size_t ch)
Context for saving svg files.
KoXmlWriter & styleWriter()
Provides access to the style writer.
bool strippedTextMode() const
Private *const d
KoXmlWriter & shapeWriter()
Provides access to the shape writer.