|
Krita Source Code Documentation
|
#include "SvgParser.h"#include <cmath>#include <FlakeDebug.h>#include <QColor>#include <QDir>#include <QPainter>#include <QPainterPath>#include <QRandomGenerator>#include <KoShape.h>#include <KoShapeRegistry.h>#include <KoShapeFactoryBase.h>#include <KoShapeGroup.h>#include <KoPathShape.h>#include <KoDocumentResourceManager.h>#include <KoPathShapeLoader.h>#include <commands/KoShapeGroupCommand.h>#include <commands/KoShapeUngroupCommand.h>#include <KoColorBackground.h>#include <KoGradientBackground.h>#include <KoMeshGradientBackground.h>#include <KoPatternBackground.h>#include <KoFilterEffectRegistry.h>#include <KoFilterEffect.h>#include "KoFilterEffectStack.h"#include "KoFilterEffectLoadingContext.h"#include <KoClipPath.h>#include <KoClipMask.h>#include <KoXmlNS.h>#include <QXmlSimpleReader>#include "SvgMeshGradient.h"#include "SvgMeshPatch.h"#include "SvgUtil.h"#include "SvgShape.h"#include "SvgGraphicContext.h"#include "SvgFilterHelper.h"#include "SvgGradientHelper.h"#include "SvgClipPathHelper.h"#include "parsers/SvgTransformParser.h"#include "kis_pointer_utils.h"#include <KoVectorPatternBackground.h>#include <KoMarker.h>#include <text/KoSvgTextShape.h>#include <text/KoSvgTextLoader.h>#include "kis_dom_utils.h"#include "kis_algebra_2d.h"#include "kis_debug.h"#include "kis_global.h"#include <QXmlStreamReader>#include <algorithm>Go to the source code of this file.
Classes | |
| struct | SvgParser::DeferredUseStore |
| struct | SvgParser::DeferredUseStore::El |
Macros | |
| #define | forEachElement(elem, parent) |
Functions | |
| void | applyDashes (const KoShapeStrokeSP srcStroke, KoShapeStrokeSP dstStroke) |
| QPointF | bakeShapeOffset (const QTransform &patternTransform, const QPointF &shapeOffset) |
| QPointF | extraShapeOffset (const KoShape *shape, const QTransform coordinateSystemOnLoading) |
| QGradient * | prepareGradientForShape (const SvgGradientHelper *gradient, const KoShape *shape, const SvgGraphicsContext *gc, QTransform *transform) |
| SvgMeshGradient * | prepareMeshGradientForShape (SvgGradientHelper *gradient, const KoShape *shape, const SvgGraphicsContext *gc) |
| #define forEachElement | ( | elem, | |
| parent ) |
Definition at line 537 of file SvgParser.cpp.
| void applyDashes | ( | const KoShapeStrokeSP | srcStroke, |
| KoShapeStrokeSP | dstStroke ) |
Definition at line 1222 of file SvgParser.cpp.
|
inline |
Definition at line 565 of file SvgParser.cpp.
References KIS_ASSERT_RECOVER_NOOP.
|
inline |
Definition at line 1720 of file SvgParser.cpp.
References KoShape::absoluteTransformation(), and KIS_SAFE_ASSERT_RECOVER_NOOP.
| QGradient * prepareGradientForShape | ( | const SvgGradientHelper * | gradient, |
| const KoShape * | shape, | ||
| const SvgGraphicsContext * | gc, | ||
| QTransform * | transform ) |
Create a converted gradient that looks the same, but linked to the bounding rect of the shape, so it would be transformed with the shape
If shape outline rect is valid, convert the gradient into OBB mode by doing some magic conversions: we compensate non-uniform size of the shape by applying an additional pre-transform
Definition at line 1039 of file SvgParser.cpp.
References KisAlgebra2D::absoluteToRelative(), KoFlake::cloneGradient(), SvgGradientHelper::gradient(), SvgGradientHelper::gradientUnits(), KIS_ASSERT, SvgGraphicsContext::matrix, KisAlgebra2D::maxDimension(), KoFlake::ObjectBoundingBox, KoShape::outline(), KoShape::outlineRect(), SvgGradientHelper::transform(), and KoShape::transformation().
| SvgMeshGradient * prepareMeshGradientForShape | ( | SvgGradientHelper * | gradient, |
| const KoShape * | shape, | ||
| const SvgGraphicsContext * | gc ) |
Definition at line 1132 of file SvgParser.cpp.
References KoShape::absoluteTransformation(), SvgGradientHelper::gradientUnits(), SvgGraphicsContext::matrix, SvgGradientHelper::meshgradient(), KoFlake::ObjectBoundingBox, KoShape::outline(), SvgMeshGradient::setTransform(), and SvgGradientHelper::transform().