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>.
Loading...
Searching...
No Matches
QSvgText Class Reference

#include <qsvggraphics_p.h>

+ Inheritance diagram for QSvgText:
+ Collaboration diagram for QSvgText:

Public Types

enum  WhitespaceMode { Default , Preserve }
 
- Public Types inherited from QSvgNode
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
}
 

Public Member Functions

 QSvgText (QSvgNode *parent, const QPointF &coord)
 
 ~QSvgText ()
 
void setTextArea (const QSizeF &size)
 
void drawCommand (QPainter *p, QSvgExtraStates &states) override
 
bool shouldDrawNode (QPainter *p, QSvgExtraStates &states) const override
 
Type type () const override
 
void addTspan (QSvgTspan *tspan)
 
const QList< QSvgTspan * > tspans () const
 
void addText (const QString &text)
 
void addLineBreak ()
 
void setWhitespaceMode (WhitespaceMode mode)
 
QRectF fastBounds (QPainter *p, QSvgExtraStates &states) const override
 
QRectF bounds (QPainter *p, QSvgExtraStates &states) const override
 
QPointF position () const
 
QSizeF size () const
 
WhitespaceMode whitespaceMode () const
 
- Public Member Functions inherited from QSvgNode
 QSvgNode (QSvgNode *parent=0)
 
virtual ~QSvgNode ()
 
void draw (QPainter *p, QSvgExtraStates &states)
 
virtual bool separateFillStroke () const
 
void fillThenStroke (QPainter *p, QSvgExtraStates &states)
 
QImage drawIntoBuffer (QPainter *p, QSvgExtraStates &states, const QRect &boundsRect)
 
void applyMaskToBuffer (QImage *proxy, QImage mask) const
 
void drawWithMask (QPainter *p, QSvgExtraStates &states, const QImage &mask, const QRect &boundsRect)
 
void applyBufferToCanvas (QPainter *p, QImage proxy) const
 
QSvgNodeparent () const
 
bool isDescendantOf (const QSvgNode *parent) const
 
void appendStyleProperty (QSvgStyleProperty *prop, const QString &id)
 
void applyStyle (QPainter *p, QSvgExtraStates &states) const
 
void applyStyleRecursive (QPainter *p, QSvgExtraStates &states) const
 
void revertStyle (QPainter *p, QSvgExtraStates &states) const
 
QSvgStylePropertystyleProperty (QSvgStyleProperty::Type type) const
 
QSvgPaintStylePropertystyleProperty (const QString &id) const
 
QSvgTinyDocumentdocument () const
 
QString typeName () const
 
virtual QRectF transformedBounds (QPainter *p, QSvgExtraStates &states) const
 
QRectF transformedBounds () const
 
void setRequiredFeatures (const QStringList &lst)
 
const QStringListrequiredFeatures () const
 
void setRequiredExtensions (const QStringList &lst)
 
const QStringListrequiredExtensions () const
 
void setRequiredLanguages (const QStringList &lst)
 
const QStringListrequiredLanguages () const
 
void setRequiredFormats (const QStringList &lst)
 
const QStringListrequiredFormats () const
 
void setRequiredFonts (const QStringList &lst)
 
const QStringListrequiredFonts () const
 
void setVisible (bool visible)
 
bool isVisible () const
 
void setDisplayMode (DisplayMode display)
 
DisplayMode displayMode () const
 
QString nodeId () const
 
void setNodeId (const QString &i)
 
QString xmlClass () const
 
void setXmlClass (const QString &str)
 
QString maskId () const
 
void setMaskId (const QString &str)
 
bool hasMask () const
 
QString filterId () const
 
void setFilterId (const QString &str)
 
bool hasFilter () const
 
QString markerStartId () const
 
void setMarkerStartId (const QString &str)
 
bool hasMarkerStart () const
 
QString markerMidId () const
 
void setMarkerMidId (const QString &str)
 
bool hasMarkerMid () const
 
QString markerEndId () const
 
void setMarkerEndId (const QString &str)
 
bool hasMarkerEnd () const
 
bool hasAnyMarker () const
 
const QSvgStylestyle () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from QSvgNode
static qreal strokeWidth (QPainter *p)
 
static void initPainter (QPainter *p)
 
- Protected Attributes inherited from QSvgNode
QSvgStyle m_style
 

Detailed Description

Definition at line 152 of file qsvggraphics_p.h.

Member Enumeration Documentation

◆ WhitespaceMode

Enumerator
Default 
Preserve 

Definition at line 155 of file qsvggraphics_p.h.

Constructor & Destructor Documentation

◆ QSvgText()

QSvgText::QSvgText ( QSvgNode * parent,
const QPointF & coord )

Definition at line 229 of file qsvggraphics.cpp.

◆ ~QSvgText()

QSvgText::~QSvgText ( )

Definition at line 238 of file qsvggraphics.cpp.

References i, and QList< T >::size().

+ Here is the call graph for this function:

Member Function Documentation

◆ addLineBreak()

void QSvgText::addLineBreak ( )
inline

Definition at line 172 of file qsvggraphics_p.h.

◆ addText()

void QSvgText::addText ( const QString & text)

Definition at line 492 of file qsvggraphics.cpp.

References QSvgTspan::addText(), QList< T >::append(), QList< T >::back(), QSvgTspan::setWhitespaceMode(), and text.

+ Here is the call graph for this function:

◆ addTspan()

void QSvgText::addTspan ( QSvgTspan * tspan)
inline

Definition at line 169 of file qsvggraphics_p.h.

◆ bounds()

QRectF QSvgText::bounds ( QPainter * p,
QSvgExtraStates & states ) const
overridevirtual

Reimplemented from QSvgNode.

Definition at line 270 of file qsvggraphics.cpp.

References boundingRect(), and shouldDrawNode().

+ Here is the call graph for this function:

◆ drawCommand()

void QSvgText::drawCommand ( QPainter * p,
QSvgExtraStates & states )
overridevirtual

Implements QSvgNode.

Definition at line 278 of file qsvggraphics.cpp.

◆ fastBounds()

QRectF QSvgText::fastBounds ( QPainter * p,
QSvgExtraStates & states ) const
overridevirtual

Reimplemented from QSvgNode.

Definition at line 252 of file qsvggraphics.cpp.

References QList< T >::at(), font, QSvgStyle::font, i, QSvgNode::m_style, QSvgFontStyle::qfont(), QString::size(), QList< T >::size(), QSvgTspan::text(), QPointF::x(), and QPointF::y().

+ Here is the call graph for this function:

◆ position()

QPointF QSvgText::position ( ) const
inline

Definition at line 178 of file qsvggraphics_p.h.

Referenced by QSvgVisitorImpl::visitTextNode().

+ Here is the caller graph for this function:

◆ setTextArea()

void QSvgText::setTextArea ( const QSizeF & size)

Definition at line 246 of file qsvggraphics.cpp.

References size(), and QSvgNode::Textarea.

Referenced by createTextAreaNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWhitespaceMode()

void QSvgText::setWhitespaceMode ( WhitespaceMode mode)
inline

Definition at line 173 of file qsvggraphics_p.h.

◆ shouldDrawNode()

bool QSvgText::shouldDrawNode ( QPainter * p,
QSvgExtraStates & states ) const
overridevirtual

Reimplemented from QSvgNode.

Definition at line 283 of file qsvggraphics.cpp.

References font, QSvgStyleProperty::FONT, qCWarning, QT_SVG_MAX_LAYOUT_SIZE, QFont::setPixelSize(), QList< T >::size(), and QSvgNode::style().

Referenced by bounds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

QSizeF QSvgText::size ( ) const
inline

Definition at line 179 of file qsvggraphics_p.h.

Referenced by setTextArea(), and QSvgVisitorImpl::visitTextNode().

+ Here is the caller graph for this function:

◆ tspans()

const QList< QSvgTspan * > QSvgText::tspans ( ) const
inline

Definition at line 170 of file qsvggraphics_p.h.

Referenced by QSvgVisitorImpl::visitTextNode(), and SvgDebugVisitor::visitTextNode().

+ Here is the caller graph for this function:

◆ type()

QSvgNode::Type QSvgText::type ( ) const
overridevirtual

Implements QSvgNode.

Definition at line 581 of file qsvggraphics.cpp.

Referenced by QSvgVisitorImpl::visitTextNode().

+ Here is the caller graph for this function:

◆ whitespaceMode()

WhitespaceMode QSvgText::whitespaceMode ( ) const
inline

Definition at line 180 of file qsvggraphics_p.h.

Referenced by QSvgVisitorImpl::visitTextNode().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: