Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSvgTextCharacterInfo Struct Reference

The KoSvgTextCharacterInfo class This is a small struct to convey information about character positioning inside a textShape. It's functionally a simplified readonly version of CharacterResult inside the TextShape. More...

#include <KoSvgTextShape.h>

Static Public Member Functions

static bool logicalLessThan (const KoSvgTextCharacterInfo &a, const KoSvgTextCharacterInfo &b)
 
static bool visualLessThan (const KoSvgTextCharacterInfo &a, const KoSvgTextCharacterInfo &b)
 

Public Attributes

QPointF advance
 
QPointF finalPos
 
int logicalIndex = -1
 
KoSvgText::FontMetrics metrics
 <Whether the character is in the middle of a cluster.
 
bool middle = false
 
qreal rotateDeg
 
bool rtl = false
 
int visualIndex = -1
 

Detailed Description

The KoSvgTextCharacterInfo class This is a small struct to convey information about character positioning inside a textShape. It's functionally a simplified readonly version of CharacterResult inside the TextShape.

Currently used for character transform adjustments.

Definition at line 778 of file KoSvgTextShape.h.

Member Function Documentation

◆ logicalLessThan()

static bool KoSvgTextCharacterInfo::logicalLessThan ( const KoSvgTextCharacterInfo & a,
const KoSvgTextCharacterInfo & b )
inlinestatic

Definition at line 799 of file KoSvgTextShape.h.

799 {
800 return a.logicalIndex < b.logicalIndex;
801 }

References logicalIndex.

◆ visualLessThan()

static bool KoSvgTextCharacterInfo::visualLessThan ( const KoSvgTextCharacterInfo & a,
const KoSvgTextCharacterInfo & b )
inlinestatic

Definition at line 789 of file KoSvgTextShape.h.

789 {
790 bool compare = false;
791 if (a.visualIndex >= 0
792 && b.visualIndex >= 0) {
793 compare = a.visualIndex < b.visualIndex;
794 } else {
795 compare = a.logicalIndex < b.logicalIndex;
796 }
797 return compare;
798 }

References logicalIndex, and visualIndex.

Member Data Documentation

◆ advance

QPointF KoSvgTextCharacterInfo::advance

Definition at line 780 of file KoSvgTextShape.h.

◆ finalPos

QPointF KoSvgTextCharacterInfo::finalPos

Definition at line 779 of file KoSvgTextShape.h.

◆ logicalIndex

int KoSvgTextCharacterInfo::logicalIndex = -1

Definition at line 783 of file KoSvgTextShape.h.

◆ metrics

KoSvgText::FontMetrics KoSvgTextCharacterInfo::metrics

<Whether the character is in the middle of a cluster.

Definition at line 786 of file KoSvgTextShape.h.

◆ middle

bool KoSvgTextCharacterInfo::middle = false

Definition at line 785 of file KoSvgTextShape.h.

◆ rotateDeg

qreal KoSvgTextCharacterInfo::rotateDeg

Definition at line 781 of file KoSvgTextShape.h.

◆ rtl

bool KoSvgTextCharacterInfo::rtl = false

Definition at line 784 of file KoSvgTextShape.h.

◆ visualIndex

int KoSvgTextCharacterInfo::visualIndex = -1

Definition at line 782 of file KoSvgTextShape.h.


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