Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgWriter.h
Go to the documentation of this file.
1
/* This file is part of the KDE project
2
SPDX-FileCopyrightText: 2002 Lars Siebold <khandha5@gmx.net>
3
SPDX-FileCopyrightText: 2002 Werner Trobin <trobin@kde.org>
4
SPDX-FileCopyrightText: 2002 Lennart Kudling <kudling@kde.org>
5
SPDX-FileCopyrightText: 2002-2003, 2005 Rob Buis <buis@kde.org>
6
SPDX-FileCopyrightText: 2005 Boudewijn Rempt <boud@valdyas.org>
7
SPDX-FileCopyrightText: 2005 Raphael Langerhorst <raphael.langerhorst@kdemail.net>
8
SPDX-FileCopyrightText: 2005 Thomas Zander <zander@kde.org>
9
SPDX-FileCopyrightText: 2005, 2008 Jan Hambrecht <jaham@gmx.net>
10
SPDX-FileCopyrightText: 2006 Inge Wallin <inge@lysator.liu.se>
11
SPDX-FileCopyrightText: 2006 Laurent Montel <montel@kde.org>
12
13
SPDX-License-Identifier: LGPL-2.0-or-later
14
*/
15
16
#ifndef SVGWRITER_H
17
#define SVGWRITER_H
18
19
#include "kritaflake_export.h"
20
#include <QList>
21
#include <QSizeF>
22
23
class
SvgSavingContext
;
24
class
KoShapeLayer
;
25
class
KoShapeGroup
;
26
class
KoShape
;
27
class
KoPathShape
;
28
class
QIODevice;
29
class
QString;
30
32
class
KRITAFLAKE_EXPORT
SvgWriter
33
{
34
public
:
36
SvgWriter
(
const
QList<KoShapeLayer*>
&layers);
37
39
SvgWriter
(
const
QList<KoShape*>
&toplevelShapes);
40
42
virtual
~SvgWriter
();
43
45
bool
save(QIODevice &outputDevice,
const
QSizeF &pageSize);
46
48
bool
save(
const
QString &filename,
const
QSizeF &pageSize,
bool
writeInlineImages);
49
50
bool
saveDetached(QIODevice &outputDevice);
51
52
bool
saveDetached(
SvgSavingContext
&savingContext);
53
54
void
setDocumentTitle(QString title);
55
void
setDocumentDescription(QString description);
56
57
private
:
58
void
saveShapes(
const
QList<KoShape*>
shapes,
SvgSavingContext
&savingContext);
59
60
void
saveLayer(
KoShapeLayer
*layer,
SvgSavingContext
&context);
61
void
saveGroup(
KoShapeGroup
*group,
SvgSavingContext
&context);
62
void
saveShape(
KoShape
*shape,
SvgSavingContext
&context);
63
void
savePath(
KoPathShape
*path,
SvgSavingContext
&context);
64
void
saveGeneric(
KoShape
*shape,
SvgSavingContext
&context);
65
66
QList<KoShape*>
m_toplevelShapes
;
67
bool
m_writeInlineImages
;
68
QString
m_documentTitle
;
69
QString
m_documentDescription
;
70
};
71
72
#endif
// SVGWRITER_H
KoPathShape
The position of a path point within a path shape.
Definition
KoPathShape.h:63
KoShapeGroup
Definition
KoShapeGroup.h:35
KoShapeLayer
Definition
KoShapeLayer.h:20
KoShape
Definition
KoShape.h:92
QList
Definition
KisQStringListFwd.h:16
SvgSavingContext
Context for saving svg files.
Definition
SvgSavingContext.cpp:26
SvgWriter
Implements exporting shapes to SVG.
Definition
SvgWriter.h:33
SvgWriter::m_writeInlineImages
bool m_writeInlineImages
Definition
SvgWriter.h:67
SvgWriter::m_documentDescription
QString m_documentDescription
Definition
SvgWriter.h:69
SvgWriter::m_documentTitle
QString m_documentTitle
Definition
SvgWriter.h:68
SvgWriter::m_toplevelShapes
QList< KoShape * > m_toplevelShapes
Definition
SvgWriter.h:66
libs
flake
svg
SvgWriter.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52