Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QSvgUtils Namespace Reference

Enumerations

enum  LengthType {
  LT_PERCENT , LT_PX , LT_PC , LT_PT ,
  LT_MM , LT_CM , LT_IN , LT_OTHER
}

Functions

bool isDigit (ushort ch)
qreal toDouble (const QChar *&str)
qreal toDouble (QStringView str, bool *ok)
qreal parseLength (QStringView str, LengthType *type, bool *ok)
qreal convertToPixels (qreal len, bool, LengthType type)
std::optional< qrealparseAngle (QStringView str)
void parseNumbersArray (const QChar *&str, QVarLengthArray< qreal, 8 > &points, const char *pattern)
std::optional< QPainterPathparsePathDataFast (QStringView dataStr, bool limitLength)

Enumeration Type Documentation

◆ LengthType

Enumerator
LT_PERCENT 
LT_PX 
LT_PC 
LT_PT 
LT_MM 
LT_CM 
LT_IN 
LT_OTHER 

Definition at line 26 of file qsvgutils_p.h.

Function Documentation

◆ convertToPixels()

qreal QSvgUtils::convertToPixels ( qreal len,
bool ,
LengthType type )

Definition at line 299 of file qsvgutils.cpp.

References LT_CM, LT_IN, LT_MM, LT_OTHER, LT_PC, LT_PERCENT, LT_PT, and LT_PX.

◆ isDigit()

bool QSvgUtils::isDigit ( ushort ch)

Definition at line 163 of file qsvgutils.cpp.

Referenced by parseNumbersArray(), and parseNumbersList().

Here is the caller graph for this function:

◆ parseAngle()

std::optional< qreal > QSvgUtils::parseAngle ( QStringView str)

Definition at line 332 of file qsvgutils.cpp.

◆ parseLength()

qreal QSvgUtils::parseLength ( QStringView str,
LengthType * type,
bool * ok = NULL )

Definition at line 258 of file qsvgutils.cpp.

References LT_CM, LT_IN, LT_MM, LT_OTHER, LT_PC, LT_PERCENT, LT_PT, and LT_PX.

◆ parseNumbersArray()

void QSvgUtils::parseNumbersArray ( const QChar *& str,
QVarLengthArray< qreal, 8 > & points,
const char * pattern = nullptr )

Definition at line 366 of file qsvgutils.cpp.

References isDigit().

Referenced by parseTransformationMatrix().

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

◆ parsePathDataFast()

std::optional< QPainterPath > QSvgUtils::parsePathDataFast ( QStringView dataStr,
bool limitLength = true )

Definition at line 397 of file qsvgutils.cpp.

◆ toDouble() [1/2]

qreal QSvgUtils::toDouble ( const QChar *& str)

Definition at line 169 of file qsvgutils.cpp.

◆ toDouble() [2/2]

qreal QSvgUtils::toDouble ( QStringView str,
bool * ok = NULL )

Definition at line 249 of file qsvgutils.cpp.

Referenced by createRectNode().

Here is the caller graph for this function: