Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qsvgnode_p.h>
Public Types | |
enum | Type { Doc , Group , Defs , Switch , Animation , Circle , Ellipse , Image , Line , Path , Polygon , Polyline , Rect , Text , Textarea , Tspan , Use , Video , Mask , Symbol , Marker , Pattern , Filter , FeMerge , FeMergenode , FeColormatrix , FeGaussianblur , FeOffset , FeComposite , FeFlood , FeUnsupported } |
enum | DisplayMode { InlineMode , BlockMode , ListItemMode , RunInMode , CompactMode , MarkerMode , TableMode , InlineTableMode , TableRowGroupMode , TableHeaderGroupMode , TableFooterGroupMode , TableRowMode , TableColumnGroupMode , TableColumnMode , TableCellMode , TableCaptionMode , NoneMode , InheritMode } |
Static Protected Member Functions | |
static qreal | strokeWidth (QPainter *p) |
static void | initPainter (QPainter *p) |
Protected Attributes | |
QSvgStyle | m_style |
Friends | |
class | QSvgTinyDocument |
Definition at line 30 of file qsvgnode_p.h.
Definition at line 67 of file qsvgnode_p.h.
enum QSvgNode::Type |
Definition at line 33 of file qsvgnode_p.h.
QSvgNode::QSvgNode | ( | QSvgNode * | parent = 0 | ) |
Definition at line 26 of file qsvgnode.cpp.
|
virtual |
Definition at line 33 of file qsvgnode.cpp.
void QSvgNode::appendStyleProperty | ( | QSvgStyleProperty * | prop, |
const QString & | id ) |
Definition at line 172 of file qsvgnode.cpp.
References QSvgTinyDocument::addNamedStyle(), QSvgStyleProperty::ANIMATE_COLOR, QSvgStyleProperty::ANIMATE_TRANSFORM, QSvgStyle::animateColor, QSvgStyle::animateTransforms, QList< T >::append(), QSvgStyleProperty::COMP_OP, QSvgStyle::compop, document(), QSvgStyleProperty::FILL, QSvgStyle::fill, QSvgStyleProperty::FONT, QSvgStyle::font, QSvgStyleProperty::GRADIENT, QSvgStyle::gradient, m_style, QSvgStyleProperty::OPACITY, QSvgStyle::opacity, QSvgStyleProperty::PATTERN, QSvgStyle::pattern, qDebug, QSvgStyleProperty::QUALITY, QSvgStyle::quality, QSvgStyleProperty::SOLID_COLOR, QSvgStyle::solidColor, QSvgStyleProperty::STROKE, QSvgStyle::stroke, QSvgStyleProperty::TRANSFORM, QSvgStyle::transform, QSvgStyleProperty::type(), QSvgStyleProperty::VIEWPORT_FILL, and QSvgStyle::viewportFill.
Referenced by QSvgMarker::QSvgMarker(), createPatternNode(), parseAnimateColorNode(), parseAnimateTransformNode(), parseBrush(), parseCompOp(), parseFont(), parseOpacity(), parsePen(), parseRenderingHints(), parseTransform(), and QSvgHandler::startElement().
Definition at line 153 of file qsvgnode.cpp.
References proxy.
Referenced by draw().
Definition at line 145 of file qsvgnode.cpp.
References QPainter::CompositionMode_DestinationOut, and proxy.
Referenced by draw(), and drawWithMask().
void QSvgNode::applyStyle | ( | QPainter * | p, |
QSvgExtraStates & | states ) const |
Definition at line 232 of file qsvgnode.cpp.
References QSvgStyle::apply(), and m_style.
Referenced by applyStyleRecursive(), QSvgTinyDocument::draw(), QSvgTinyDocument::draw(), draw(), QSvgMarker::drawCommand(), transformedBounds(), and transformedBounds().
void QSvgNode::applyStyleRecursive | ( | QPainter * | p, |
QSvgExtraStates & | states ) const |
Apply the styles of all parents to the painter and the states. The styles are applied from the top level node to the current node. This function can be used to set the correct style for a node if it's draw function is triggered out of the ordinary draw context, for example the mask node, that is cross-referenced.
Definition at line 246 of file qsvgnode.cpp.
References applyStyle(), applyStyleRecursive(), and parent().
Referenced by applyStyleRecursive(), and QSvgMask::createMask().
|
virtual |
Reimplemented in QSvgFeFilterPrimitive, QSvgEllipse, QSvgImage, QSvgLine, QSvgPath, QSvgPolygon, QSvgPolyline, QSvgRect, QSvgText, QSvgUse, and QSvgStructureNode.
Definition at line 338 of file qsvgnode.cpp.
Referenced by draw(), fastBounds(), QSvgPattern::patternImage(), and transformedBounds().
QSvgNode::DisplayMode QSvgNode::displayMode | ( | ) | const |
Definition at line 599 of file qsvgnode.cpp.
Referenced by QSvgMask::createMask(), QSvgTinyDocument::draw(), QSvgTinyDocument::draw(), QSvgG::drawCommand(), QSvgSymbol::drawCommand(), QSvgMarker::drawCommand(), and QSvgSwitch::drawCommand().
QSvgTinyDocument * QSvgNode::document | ( | ) | const |
Definition at line 372 of file qsvgnode.cpp.
References Doc, parent(), and type().
Referenced by QSvgStructureNode::addChild(), appendStyleProperty(), QSvgStyle::apply(), QSvgAnimateColor::apply(), QSvgFilterContainer::applyFilter(), QSvgMask::createMask(), createMaskNode(), draw(), QSvgMarker::drawMarkersForNode(), hasAnyMarker(), hasFilter(), hasMarkerEnd(), hasMarkerMid(), hasMarkerStart(), hasMask(), QSvgFeFilterPrimitive::localFilterBoundingBox(), parseAnimateColorNode(), parseAnimateTransformNode(), parseFont(), QSvgAnimateTransform::resolveMatrix(), QSvgStructureNode::scopeNode(), and styleProperty().
void QSvgNode::draw | ( | QPainter * | p, |
QSvgExtraStates & | states ) |
Definition at line 38 of file qsvgnode.cpp.
References applyBufferToCanvas(), applyMaskToBuffer(), applyStyle(), bounds(), document(), drawCommand(), drawIntoBuffer(), drawWithMask(), fillThenStroke(), filterId(), hasFilter(), hasMask(), Mask, maskId(), QSvgTinyDocument::namedNode(), proxy, Q_UNLIKELY, qCDebug, revertStyle(), separateFillStroke(), shouldDrawNode(), QElapsedTimer::start(), QSvgFilterContainer::supported(), and typeName().
Referenced by QSvgMask::createMask(), QSvgTinyDocument::draw(), QSvgTinyDocument::draw(), QSvgG::drawCommand(), QSvgUse::drawCommand(), QSvgSymbol::drawCommand(), QSvgMarker::drawCommand(), and QSvgSwitch::drawCommand().
|
pure virtual |
Implemented in QSvgFeFilterPrimitive, QSvgAnimation, QSvgTspan, QSvgVideo, QSvgG, QSvgDefs, QSvgSymbolLike, QSvgFilterContainer, QSvgMask, QSvgPattern, QSvgTinyDocument, QSvgEllipse, QSvgImage, QSvgLine, QSvgPath, QSvgPolygon, QSvgPolyline, QSvgRect, QSvgText, QSvgUse, QSvgSymbol, QSvgMarker, and QSvgSwitch.
Referenced by draw(), drawIntoBuffer(), and fillThenStroke().
QImage QSvgNode::drawIntoBuffer | ( | QPainter * | p, |
QSvgExtraStates & | states, | ||
const QRect & | boundsRect ) |
Definition at line 122 of file qsvgnode.cpp.
References QImageIOHandler::allocateImage(), drawCommand(), fillThenStroke(), QImage::Format_RGBA8888, proxy, qCWarning, separateFillStroke(), and Qt::transparent.
Referenced by draw(), and drawWithMask().
void QSvgNode::drawWithMask | ( | QPainter * | p, |
QSvgExtraStates & | states, | ||
const QImage & | mask, | ||
const QRect & | boundsRect ) |
Definition at line 109 of file qsvgnode.cpp.
References applyMaskToBuffer(), drawIntoBuffer(), and proxy.
Referenced by draw().
|
virtual |
Reimplemented in QSvgFeFilterPrimitive, QSvgEllipse, QSvgLine, QSvgPath, QSvgPolygon, QSvgPolyline, QSvgRect, and QSvgText.
Definition at line 333 of file qsvgnode.cpp.
References bounds().
Referenced by shouldDrawNode().
void QSvgNode::fillThenStroke | ( | QPainter * | p, |
QSvgExtraStates & | states ) |
Definition at line 85 of file qsvgnode.cpp.
References drawCommand(), Qt::NoBrush, and Qt::NoPen.
Referenced by draw(), and drawIntoBuffer().
QString QSvgNode::filterId | ( | ) | const |
Definition at line 519 of file qsvgnode.cpp.
Referenced by draw().
bool QSvgNode::hasAnyMarker | ( | ) | const |
Definition at line 587 of file qsvgnode.cpp.
References document(), hasMarkerEnd(), hasMarkerMid(), hasMarkerStart(), testFlag(), and QtSvg::Tiny12FeaturesOnly.
Referenced by QSvgMarker::drawMarkersForNode().
bool QSvgNode::hasFilter | ( | ) | const |
Definition at line 529 of file qsvgnode.cpp.
References document(), QString::isEmpty(), testFlag(), and QtSvg::Tiny12FeaturesOnly.
Referenced by draw().
bool QSvgNode::hasMarkerEnd | ( | ) | const |
Definition at line 580 of file qsvgnode.cpp.
References document(), QString::isEmpty(), testFlag(), and QtSvg::Tiny12FeaturesOnly.
Referenced by QSvgMarker::drawMarkersForNode(), and hasAnyMarker().
bool QSvgNode::hasMarkerMid | ( | ) | const |
Definition at line 563 of file qsvgnode.cpp.
References document(), QString::isEmpty(), testFlag(), and QtSvg::Tiny12FeaturesOnly.
Referenced by QSvgMarker::drawMarkersForNode(), and hasAnyMarker().
bool QSvgNode::hasMarkerStart | ( | ) | const |
Definition at line 546 of file qsvgnode.cpp.
References document(), QString::isEmpty(), testFlag(), and QtSvg::Tiny12FeaturesOnly.
Referenced by QSvgMarker::drawMarkersForNode(), and hasAnyMarker().
bool QSvgNode::hasMask | ( | ) | const |
Definition at line 512 of file qsvgnode.cpp.
References document(), QString::isEmpty(), testFlag(), and QtSvg::Tiny12FeaturesOnly.
Referenced by QSvgMask::createMask(), and draw().
Definition at line 612 of file qsvgnode.cpp.
References QPainter::Antialiasing, Qt::black, Qt::FlatCap, font, Qt::NoBrush, QFont::pixelSize(), QFont::pointSize(), QPen::setMiterLimit(), QFont::setPointSizeF(), QPainter::SmoothPixmapTransform, Qt::SolidLine, and Qt::SvgMiterJoin.
Referenced by QSvgMask::createMask(), and QSvgTinyDocument::draw().
bool QSvgNode::isDescendantOf | ( | const QSvgNode * | parent | ) | const |
Definition at line 161 of file qsvgnode.cpp.
References parent().
Referenced by QSvgUse::bounds(), createUseNode(), and QSvgUse::drawCommand().
|
inline |
Definition at line 207 of file qsvgnode_p.h.
Referenced by QSvgMask::createMask(), QSvgTinyDocument::draw(), QSvgG::drawCommand(), QSvgSymbol::drawCommand(), QSvgMarker::drawCommand(), QSvgSwitch::drawCommand(), parseVisibility(), and setVisible().
QString QSvgNode::markerEndId | ( | ) | const |
Definition at line 570 of file qsvgnode.cpp.
Referenced by QSvgMarker::drawMarkersForNode().
QString QSvgNode::markerMidId | ( | ) | const |
Definition at line 553 of file qsvgnode.cpp.
QString QSvgNode::markerStartId | ( | ) | const |
Definition at line 536 of file qsvgnode.cpp.
Referenced by QSvgMarker::drawMarkersForNode().
QString QSvgNode::maskId | ( | ) | const |
Definition at line 502 of file qsvgnode.cpp.
Referenced by QSvgMask::createMask(), and draw().
|
inline |
Definition at line 212 of file qsvgnode_p.h.
Referenced by QSvgVisitorImpl::visitDocumentNodeEnd(), SvgDebugVisitor::visitStructureNodeEnd(), and SvgDebugVisitor::visitStructureNodeStart().
|
inline |
Definition at line 202 of file qsvgnode_p.h.
Referenced by applyStyleRecursive(), createFontNode(), createLinearGradientNode(), document(), QSvgTinyDocument::draw(), isDescendantOf(), QSvgStyleSelector::parentNode(), parseVisibility(), styleProperty(), transformedBounds(), and QSvgTinyDocument::transformForElement().
const QStringList & QSvgNode::requiredExtensions | ( | ) | const |
Definition at line 437 of file qsvgnode.cpp.
Referenced by QSvgSwitch::drawCommand().
const QStringList & QSvgNode::requiredFeatures | ( | ) | const |
Definition at line 427 of file qsvgnode.cpp.
Referenced by QSvgSwitch::drawCommand().
const QStringList & QSvgNode::requiredFonts | ( | ) | const |
Definition at line 467 of file qsvgnode.cpp.
Referenced by QSvgSwitch::drawCommand().
const QStringList & QSvgNode::requiredFormats | ( | ) | const |
Definition at line 457 of file qsvgnode.cpp.
Referenced by QSvgSwitch::drawCommand().
const QStringList & QSvgNode::requiredLanguages | ( | ) | const |
Definition at line 447 of file qsvgnode.cpp.
Referenced by QSvgSwitch::drawCommand().
void QSvgNode::revertStyle | ( | QPainter * | p, |
QSvgExtraStates & | states ) const |
Definition at line 253 of file qsvgnode.cpp.
References m_style, and QSvgStyle::revert().
Referenced by QSvgTinyDocument::draw(), QSvgTinyDocument::draw(), draw(), QSvgMarker::drawCommand(), and transformedBounds().
|
inlinevirtual |
Reimplemented in QSvgEllipse, QSvgPath, QSvgPolygon, QSvgPolyline, and QSvgRect.
Definition at line 92 of file qsvgnode_p.h.
Referenced by draw(), and drawIntoBuffer().
void QSvgNode::setDisplayMode | ( | DisplayMode | display | ) |
Definition at line 594 of file qsvgnode.cpp.
Referenced by parseOthers().
Definition at line 524 of file qsvgnode.cpp.
References str.
Referenced by parseExtendedAttributes().
Definition at line 575 of file qsvgnode.cpp.
References str.
Referenced by parseExtendedAttributes().
Definition at line 558 of file qsvgnode.cpp.
References str.
Referenced by parseExtendedAttributes().
Definition at line 541 of file qsvgnode.cpp.
References str.
Referenced by parseExtendedAttributes().
Definition at line 507 of file qsvgnode.cpp.
References str.
Referenced by parseExtendedAttributes().
Definition at line 492 of file qsvgnode.cpp.
References i.
Referenced by parseCoreNode(), and parseStopNode().
void QSvgNode::setRequiredExtensions | ( | const QStringList & | lst | ) |
Definition at line 432 of file qsvgnode.cpp.
Referenced by parseCoreNode().
void QSvgNode::setRequiredFeatures | ( | const QStringList & | lst | ) |
Definition at line 422 of file qsvgnode.cpp.
Referenced by parseCoreNode().
void QSvgNode::setRequiredFonts | ( | const QStringList & | lst | ) |
Definition at line 462 of file qsvgnode.cpp.
Referenced by parseCoreNode().
void QSvgNode::setRequiredFormats | ( | const QStringList & | lst | ) |
Definition at line 452 of file qsvgnode.cpp.
Referenced by parseCoreNode().
void QSvgNode::setRequiredLanguages | ( | const QStringList & | lst | ) |
Definition at line 442 of file qsvgnode.cpp.
Referenced by parseCoreNode().
void QSvgNode::setVisible | ( | bool | visible | ) |
Definition at line 472 of file qsvgnode.cpp.
References isVisible(), and setVisible().
Referenced by parseVisibility(), and setVisible().
Definition at line 497 of file qsvgnode.cpp.
References str.
Referenced by parseCoreNode(), and parseStopNode().
|
virtual |
Reimplemented in QSvgText, QSvgG, and QSvgDefs.
Definition at line 626 of file qsvgnode.cpp.
References fastBounds(), QRectF::height(), NoneMode, qCWarning, qEnvironmentVariableIntValue(), QT_SVG_SIZE_LIMIT, type(), and QRectF::width().
Referenced by draw().
Definition at line 604 of file qsvgnode.cpp.
References QPen::brush(), QPen::isCosmetic(), Qt::NoBrush, Qt::NoPen, QBrush::style(), QPen::style(), and QPen::widthF().
Referenced by QSvgEllipse::bounds(), QSvgLine::bounds(), QSvgPath::bounds(), QSvgPolygon::bounds(), QSvgPolyline::bounds(), and QSvgRect::bounds().
|
inline |
Definition at line 169 of file qsvgnode_p.h.
Referenced by QSvgTinyDocument::addNamedStyle(), QSvgText::shouldDrawNode(), and QSvgVisitorImpl::visitTextNode().
QSvgPaintStyleProperty * QSvgNode::styleProperty | ( | const QString & | id | ) | const |
Definition at line 324 of file qsvgnode.cpp.
References document(), QSvgTinyDocument::namedStyle(), and QString::remove().
QSvgStyleProperty * QSvgNode::styleProperty | ( | QSvgStyleProperty::Type | type | ) | const |
Definition at line 258 of file qsvgnode.cpp.
References QSvgStyleProperty::ANIMATE_COLOR, QSvgStyleProperty::ANIMATE_TRANSFORM, QSvgStyle::animateColor, QSvgStyle::animateTransforms, QSvgStyleProperty::COMP_OP, QSvgStyle::compop, QSvgStyleProperty::FILL, QSvgStyle::fill, QList< T >::first(), QSvgStyleProperty::FONT, QSvgStyle::font, QSvgStyleProperty::GRADIENT, QSvgStyle::gradient, QList< T >::isEmpty(), m_style, QSvgStyleProperty::OPACITY, QSvgStyle::opacity, parent(), QSvgStyleProperty::PATTERN, QSvgStyle::pattern, QSvgStyleProperty::QUALITY, QSvgStyle::quality, QSvgStyleProperty::SOLID_COLOR, QSvgStyle::solidColor, QSvgStyleProperty::STROKE, QSvgStyle::stroke, QSvgStyleProperty::TRANSFORM, QSvgStyle::transform, QSvgStyleProperty::VIEWPORT_FILL, and QSvgStyle::viewportFill.
Referenced by parseBaseGradient(), QSvgGradientStyle::resolveStops_helper(), and styleFromUrl().
QRectF QSvgNode::transformedBounds | ( | ) | const |
Definition at line 343 of file qsvgnode.cpp.
References applyStyle(), Qt::FlatCap, QImage::Format_RGB32, i, QRectF::isEmpty(), Qt::NoBrush, parent(), QPen::setMiterLimit(), Qt::SolidLine, Qt::SvgMiterJoin, and transformedBounds().
Referenced by transformedBounds(), and QSvgTinyDocument::viewBox().
|
virtual |
Definition at line 484 of file qsvgnode.cpp.
References applyStyle(), bounds(), rect, and revertStyle().
Referenced by QSvgUse::bounds(), QSvgTinyDocument::boundsOnElement(), and QSvgTinyDocument::draw().
|
pure virtual |
Implemented in QSvgFeColorMatrix, QSvgFeGaussianBlur, QSvgFeOffset, QSvgFeMerge, QSvgFeMergeNode, QSvgFeComposite, QSvgFeFlood, QSvgFeUnsupported, QSvgAnimation, QSvgEllipse, QSvgCircle, QSvgImage, QSvgLine, QSvgPath, QSvgPolygon, QSvgPolyline, QSvgRect, QSvgText, QSvgTspan, QSvgUse, QSvgVideo, QSvgG, QSvgDefs, QSvgSymbol, QSvgMarker, QSvgFilterContainer, QSvgSwitch, QSvgMask, QSvgPattern, and QSvgTinyDocument.
Referenced by QSvgFeFilterPrimitive::castToFilterPrimitive(), QSvgHandler::characters(), createFontNode(), createUseNode(), document(), QSvgMarker::drawMarkersForNode(), parseTbreakNode(), shouldDrawNode(), QSvgHandler::startElement(), QSvgVisitor::traverse(), QSvgVisitor::traverse(), typeName(), typeName(), and SvgDebugVisitor::visitStructureNodeStart().
QString QSvgNode::typeName | ( | ) | const |
Definition at line 384 of file qsvgnode.cpp.
References Animation, Circle, Defs, Doc, Ellipse, FeColormatrix, FeComposite, FeFlood, FeGaussianblur, FeMerge, FeMergenode, FeOffset, FeUnsupported, Filter, Group, Image, Line, Marker, Mask, Path, Pattern, Polygon, Polyline, QStringLiteral, Rect, Switch, Symbol, Text, Textarea, Tspan, type(), Use, and Video.
Referenced by draw(), and QSvgStyleSelector::nodeToName().
|
inline |
Definition at line 217 of file qsvgnode_p.h.
|
friend |
Definition at line 199 of file qsvgnode_p.h.
|
mutableprotected |
Definition at line 171 of file qsvgnode_p.h.
Referenced by appendStyleProperty(), applyStyle(), QSvgText::fastBounds(), revertStyle(), styleProperty(), and QSvgTinyDocument::transformForElement().