Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgGraphicContext.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2003, 2005 Rob Buis <buis@kde.org>
3 * SPDX-FileCopyrightText: 2007, 2009 Jan Hambrecht <jaham@gmx.net>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#include "SvgGraphicContext.h"
9
10#include "kis_pointer_utils.h"
11
12
14: stroke(toQShared(new KoShapeStroke()))
15, textProperties(KoSvgTextProperties())
16{
17 stroke->setLineStyle(Qt::NoPen, QVector<qreal>()); // default is no stroke
18 stroke->setLineWidth(1.0);
19 stroke->setCapStyle(Qt::FlatCap);
20 stroke->setJoinStyle(Qt::MiterJoin);
21}
22
24 : stroke(toQShared(new KoShapeStroke(*(gc.stroke.data()))))
25{
26 KoShapeStrokeSP newStroke = stroke;
27 *this = gc;
28 this->stroke = newStroke;
29}
30
32{
43
45 stroke->setLineStyle(Qt::NoPen, QVector<qreal>()); // default is no stroke
46 stroke->setLineWidth(1.0);
47 stroke->setCapStyle(Qt::FlatCap);
48 stroke->setJoinStyle(Qt::MiterJoin);
49
51 fillRule = Qt::WindingFill;
52 fillColor = QColor(Qt::black); // default is black fill as per svg spec
53
54 opacity = 1.0;
55
56 currentColor = Qt::black;
57}
Qt::FillRule fillRule
the current fill rule
void workaroundClearInheritedFillProperties()
StyleType strokeType
the current stroke type
KoShapeStrokeSP stroke
the current stroke
StyleType fillType
the current fill type
qreal opacity
the shapes opacity
QColor currentColor
the current color
QColor fillColor
the current fill color. Default is black fill as per svg spec
QSharedPointer< T > toQShared(T *ptr)