|
Krita Source Code Documentation
|
#include <SvgStyleParser.h>
Inheritance diagram for SvgStyleParser:Public Member Functions | |
| SvgStyles | collectStyles (const QDomElement &) |
| Creates style map from given xml element. | |
| SvgStyles | mergeStyles (const QDomElement &, const QDomElement &) |
| Merges two style elements, returning the merged style. | |
| SvgStyles | mergeStyles (const SvgStyles &, const SvgStyles &) |
| Merges two style elements, returning the merged style. | |
| bool | parseColor (QColor &, const QString &) |
| Parses a color attribute. | |
| QPair< qreal, QColor > | parseColorStop (const QDomElement &, SvgGraphicsContext *context, qreal &previousOffset) |
| void | parseColorStops (QGradient *, const QDomElement &, SvgGraphicsContext *context, const QGradientStops &defaultStops) |
| Parses gradient color stops. | |
| void | parseFont (const SvgStyles &styles) |
| Parses font attributes. | |
| SvgStyles | parseOneCssStyle (const QString &style, const QStringList &interestingAttributes) |
| void | parseStyle (const SvgStyles &styles, const bool inheritByDefault=false) |
| Parses specified style attributes. | |
| Private (SvgLoadingContext &loadingContext) | |
| SvgStyleParser (SvgLoadingContext &context) | |
| ~SvgStyleParser () | |
Public Attributes | |
| SvgLoadingContext & | context |
| QStringList | fontAttributes |
| font related attributes | |
| QStringList | styleAttributes |
| style related attributes | |
| QStringList | textAttributes |
| text related attributes | |
Private Member Functions | |
| QString | inheritedAttribute (const QString &attributeName, const QDomElement &e) |
| Returns inherited attribute value for specified element. | |
| void | parsePA (SvgGraphicsContext *, const QString &, const QString &) |
| Parses a single style attribute. | |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Private Attributes | |
| Private *const | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Definition at line 28 of file SvgStyleParser.cpp.
|
explicit |
Definition at line 104 of file SvgStyleParser.cpp.
| SvgStyleParser::~SvgStyleParser | ( | ) |
| SvgStyles SvgStyleParser::collectStyles | ( | const QDomElement & | e | ) |
Creates style map from given xml element.
Definition at line 473 of file SvgStyleParser.cpp.
References d, and inheritedAttribute().
|
private |
Returns inherited attribute value for specified element.
Definition at line 557 of file SvgStyleParser.cpp.
| SvgStyles SvgStyleParser::mergeStyles | ( | const QDomElement & | e1, |
| const QDomElement & | e2 ) |
Merges two style elements, returning the merged style.
Definition at line 552 of file SvgStyleParser.cpp.
References collectStyles(), and mergeStyles().
| SvgStyles SvgStyleParser::mergeStyles | ( | const SvgStyles & | referencedBy, |
| const SvgStyles & | referencedStyles ) |
Merges two style elements, returning the merged style.
Definition at line 538 of file SvgStyleParser.cpp.
| bool SvgStyleParser::parseColor | ( | QColor & | color, |
| const QString & | s ) |
Parses a color attribute.
Definition at line 361 of file SvgStyleParser.cpp.
References d, KoColor::fromQColor(), KoColor::fromSVG11(), and KoColor::toQColor().
| QPair< qreal, QColor > SvgStyleParser::parseColorStop | ( | const QDomElement & | stop, |
| SvgGraphicsContext * | context, | ||
| qreal & | previousOffset ) |
Definition at line 374 of file SvgStyleParser.cpp.
References context, parseColor(), parseOneCssStyle(), and KisDomUtils::toDouble().
| void SvgStyleParser::parseColorStops | ( | QGradient * | gradient, |
| const QDomElement & | e, | ||
| SvgGraphicsContext * | context, | ||
| const QGradientStops & | defaultStops ) |
Parses gradient color stops.
Definition at line 427 of file SvgStyleParser.cpp.
References context, forEachElement, and parseColorStop().
Parses font attributes.
Definition at line 134 of file SvgStyleParser.cpp.
| SvgStyles SvgStyleParser::parseOneCssStyle | ( | const QString & | style, |
| const QStringList & | interestingAttributes ) |
Definition at line 450 of file SvgStyleParser.cpp.
|
private |
Parses a single style attribute.
Definition at line 156 of file SvgStyleParser.cpp.
References SvgGraphicsContext::autoFillMarkers, SvgGraphicsContext::clipMaskId, SvgGraphicsContext::clipPathId, SvgGraphicsContext::clipRule, SvgGraphicsContext::Complex, SvgGraphicsContext::currentColor, d, SvgGraphicsContext::display, SvgGraphicsContext::fillColor, SvgGraphicsContext::fillId, SvgGraphicsContext::fillRule, SvgGraphicsContext::fillType, SvgGraphicsContext::filterId, SvgUtil::fromPercentage(), SvgGraphicsContext::markerEndId, SvgGraphicsContext::markerMidId, SvgGraphicsContext::markerStartId, SvgGraphicsContext::None, SvgGraphicsContext::opacity, SvgGraphicsContext::paintOrder, parseColor(), KoSvgTextProperties::parseSvgTextAttribute(), SvgUtil::parseUnitXY(), SvgGraphicsContext::shapeInsideValue, SvgGraphicsContext::shapeSubtractValue, SvgGraphicsContext::Solid, SvgGraphicsContext::stroke, SvgGraphicsContext::strokeId, SvgGraphicsContext::strokeType, SvgGraphicsContext::textProperties, and SvgGraphicsContext::visible.
Parses specified style attributes.
Definition at line 115 of file SvgStyleParser.cpp.
References d, SvgGraphicsContext::fillType, SvgGraphicsContext::Inherit, parsePA(), and SvgGraphicsContext::strokeType.
|
inline |
Definition at line 31 of file SvgStyleParser.cpp.
References KoSvgTextProperties::supportedXmlAttributes().
| SvgLoadingContext& SvgStyleParser::context |
Definition at line 98 of file SvgStyleParser.cpp.
|
private |
Definition at line 65 of file SvgStyleParser.h.
| QStringList SvgStyleParser::fontAttributes |
font related attributes
Definition at line 100 of file SvgStyleParser.cpp.
| QStringList SvgStyleParser::styleAttributes |
style related attributes
Definition at line 101 of file SvgStyleParser.cpp.
| QStringList SvgStyleParser::textAttributes |
text related attributes
Definition at line 99 of file SvgStyleParser.cpp.