Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSvgText::AutoValue Struct Reference

#include <KoSvgText.h>

+ Inheritance diagram for KoSvgText::AutoValue:

Public Member Functions

 AutoValue ()
 
 AutoValue (qreal _customValue)
 
bool operator== (const AutoValue &other) const
 

Public Attributes

qreal customValue = 0.0
 
bool isAuto = true
 

Detailed Description

AutoValue represents the "auto-or-real" values used in SVG

Some SVG attributes can be set to either "auto" or some floating point value. E.g. 'kerning' attribute. If its value is "auto", the kerning is defined by the kerning tables of the font. And if its value is a real number, e.g. 0 or 5.5, the font kerning is set to this particular number.

Definition at line 444 of file KoSvgText.h.

Constructor & Destructor Documentation

◆ AutoValue() [1/2]

KoSvgText::AutoValue::AutoValue ( )
inline

Definition at line 446 of file KoSvgText.h.

446{}

◆ AutoValue() [2/2]

KoSvgText::AutoValue::AutoValue ( qreal _customValue)
inline

Definition at line 447 of file KoSvgText.h.

447: isAuto(false), customValue(_customValue) {}

Member Function Documentation

◆ operator==()

bool KoSvgText::AutoValue::operator== ( const AutoValue & other) const
inline

Definition at line 452 of file KoSvgText.h.

452 {
453 return isAuto == other.isAuto && (isAuto || qFuzzyCompare(customValue, other.customValue));
454 }
static bool qFuzzyCompare(half p1, half p2)

References customValue, isAuto, and qFuzzyCompare().

Member Data Documentation

◆ customValue

qreal KoSvgText::AutoValue::customValue = 0.0

Definition at line 450 of file KoSvgText.h.

◆ isAuto

bool KoSvgText::AutoValue::isAuto = true

Definition at line 449 of file KoSvgText.h.


The documentation for this struct was generated from the following file: