|
Krita Source Code Documentation
|
Helper class to save svg styles. More...
#include <SvgStyleWriter.h>
Static Public Member Functions | |
| static QString | embedShape (const KoShape *shape, SvgSavingContext &context) |
| static void | saveMetadata (const KoShape *shape, SvgSavingContext &context) |
| static void | saveSvgBasicStyle (const bool isVisible, const qreal transparency, const QVector< KoShape::PaintOrder > paintOrder, bool inheritPaintorder, SvgSavingContext &context, bool textShape=false) |
| Saves only stroke, fill and transparency of the shape. | |
| static void | saveSvgFill (QSharedPointer< KoShapeBackground > background, const bool fillRuleEvenOdd, const QRectF outlineRect, const QSizeF size, const QTransform absoluteTransform, SvgSavingContext &context) |
| Saves fill style of specified shape. | |
| static void | saveSvgStroke (KoShapeStrokeModelSP, SvgSavingContext &context) |
| Saves stroke style of specified shape. | |
| static void | saveSvgStyle (KoShape *shape, SvgSavingContext &context) |
| Saves the style of the specified shape. | |
Static Protected Member Functions | |
| static void | saveSvgClipping (KoShape *shape, SvgSavingContext &context) |
| Saves clipping of specified shape. | |
| static void | saveSvgColorStops (const QGradientStops &colorStops, SvgSavingContext &context) |
| Saves gradient color stops. | |
| static void | saveSvgEffects (KoShape *shape, SvgSavingContext &context) |
| Saves effects of specified shape. | |
| static QString | saveSvgGradient (const QGradient *gradient, const QTransform &gradientTransform, SvgSavingContext &context) |
| Saves gradient. | |
| static void | saveSvgMarkers (KoShape *shape, SvgSavingContext &context) |
| Saves markers of the path shape if present. | |
| static void | saveSvgMasking (KoShape *shape, SvgSavingContext &context) |
| Saves masking of specified shape. | |
| static QString | saveSvgMeshGradient (SvgMeshGradient *gradient, const QTransform &transform, SvgSavingContext &context) |
| static QString | saveSvgPattern (QSharedPointer< KoPatternBackground > pattern, const QSizeF shapeSize, const QTransform absoluteTransform, SvgSavingContext &context) |
| Saves pattern. | |
| static QString | saveSvgVectorPattern (QSharedPointer< KoVectorPatternBackground > pattern, const QRectF outlineRect, SvgSavingContext &context) |
Helper class to save svg styles.
Definition at line 35 of file SvgStyleWriter.h.
|
static |
Definition at line 227 of file SvgStyleWriter.cpp.
References KoShape::cloneShape(), SvgSavingContext::createUID(), embedShapes(), KoShape::setName(), and SvgSavingContext::styleWriter.
|
static |
Definition at line 241 of file SvgStyleWriter.cpp.
References KoShape::additionalAttribute(), and SvgSavingContext::shapeWriter.
|
static |
Saves only stroke, fill and transparency of the shape.
Definition at line 73 of file SvgStyleWriter.cpp.
References KoShape::defaultPaintOrder(), KoShape::Fill, KoShape::Markers, p, SvgSavingContext::shapeWriter, and KoShape::Stroke.
|
staticprotected |
Saves clipping of specified shape.
Definition at line 257 of file SvgStyleWriter.cpp.
References KoShape::clipPath(), KoClipPath::clipRule, KoClipPath::clipShapes(), KoClipPath::coordinates, KoFlake::coordinateToString(), SvgSavingContext::createUID(), embedShapes(), SvgSavingContext::shapeWriter, and SvgSavingContext::styleWriter.
|
staticprotected |
Saves gradient color stops.
Definition at line 364 of file SvgStyleWriter.cpp.
References SvgSavingContext::styleWriter.
|
staticprotected |
Saves effects of specified shape.
Definition at line 198 of file SvgStyleWriter.cpp.
References SvgSavingContext::createUID(), KoFilterEffectStack::filterEffects, KoShape::filterEffectStack(), KoFilterEffectStack::save(), SvgSavingContext::shapeWriter, and SvgSavingContext::styleWriter.
|
static |
Saves fill style of specified shape.
Definition at line 101 of file SvgStyleWriter.cpp.
References saveSvgGradient(), saveSvgMeshGradient(), saveSvgPattern(), saveSvgVectorPattern(), and SvgSavingContext::shapeWriter.
|
staticprotected |
Saves gradient.
Definition at line 385 of file SvgStyleWriter.cpp.
References convertGradientMode(), SvgSavingContext::createUID(), saveSvgColorStops(), SvgSavingContext::styleWriter, and SvgUtil::writeTransformAttributeLazy().
|
staticprotected |
Saves markers of the path shape if present.
Definition at line 349 of file SvgStyleWriter.cpp.
References KoPathShape::autoFillMarkers(), KoFlake::EndMarker, KoPathShape::hasMarkers(), KoFlake::MidMarker, SvgSavingContext::shapeWriter, and KoFlake::StartMarker.
|
staticprotected |
Saves masking of specified shape.
Definition at line 278 of file SvgStyleWriter.cpp.
References KoShape::clipMask(), KoClipMask::contentCoordinates, KoClipMask::coordinates, KoFlake::coordinateToString(), SvgSavingContext::createUID(), embedShapes(), KoClipMask::maskRect, KoClipMask::shapes, SvgSavingContext::shapeWriter, and SvgSavingContext::styleWriter.
|
staticprotected |
Definition at line 456 of file SvgStyleWriter.cpp.
References SvgMeshGradient::BILINEAR, SvgMeshStop::color, SvgSavingContext::createUID(), SvgMeshGradient::getMeshArray(), SvgMeshArray::getPatch(), SvgMeshPatch::getSegment(), SvgMeshPatch::getStop(), SvgMeshGradient::gradientUnits(), SvgMeshGradient::isValid(), SvgMeshPatch::Left, SvgMeshArray::numColumns(), SvgMeshArray::numRows(), KoFlake::ObjectBoundingBox, SvgMeshStop::point, SvgMeshPatch::Right, KisPortingUtils::setUtf8OnStream(), SvgSavingContext::styleWriter, SvgMeshPatch::Top, SvgMeshGradient::type(), and SvgUtil::writeTransformAttributeLazy().
|
staticprotected |
Saves pattern.
Definition at line 549 of file SvgStyleWriter.cpp.
References KoPatternBackground::Bottom, KoPatternBackground::BottomLeft, KoPatternBackground::BottomRight, KoPatternBackground::Center, SvgSavingContext::createUID(), KoPatternBackground::Left, KisMimeDatabase::mimeTypeForSuffix(), KoPatternBackground::Right, KoPatternBackground::Stretched, SvgSavingContext::styleWriter, KoPatternBackground::Top, KoPatternBackground::TopLeft, KoPatternBackground::TopRight, KisDomUtils::toString(), and SvgUtil::toUserSpace().
|
static |
Saves stroke style of specified shape.
Definition at line 140 of file SvgStyleWriter.cpp.
References saveSvgGradient(), SvgSavingContext::shapeWriter, KisDomUtils::toString(), and SvgUtil::toUserSpace().
|
static |
Saves the style of the specified shape.
Definition at line 54 of file SvgStyleWriter.cpp.
References KoShape::absoluteTransformation(), KoShape::background(), KoPathShape::fillRule(), KoShape::inheritBackground(), KoShape::inheritPaintOrder(), KoShape::inheritStroke(), KoShape::isVisible(), KoShape::outlineRect(), KoShape::paintOrder(), saveSvgBasicStyle(), saveSvgClipping(), saveSvgEffects(), saveSvgFill(), saveSvgMarkers(), saveSvgMasking(), saveSvgStroke(), KoShape::size(), KoShape::stroke(), and KoShape::transparency().
|
staticprotected |
Definition at line 630 of file SvgStyleWriter.cpp.
References KoShape::applyAbsoluteTransformation(), KoShape::cloneShape(), KoFlake::coordinateToString(), SvgSavingContext::createUID(), embedShapes(), KisAlgebra2D::mapToRect(), KoFlake::ObjectBoundingBox, SvgSavingContext::styleWriter, and SvgUtil::writeTransformAttributeLazy().