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 771 of file KoSvgTextShape.h.

Member Function Documentation

◆ logicalLessThan()

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

Definition at line 792 of file KoSvgTextShape.h.

792 {
793 return a.logicalIndex < b.logicalIndex;
794 }

References logicalIndex.

◆ visualLessThan()

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

Definition at line 782 of file KoSvgTextShape.h.

782 {
783 bool compare = false;
784 if (a.visualIndex >= 0
785 && b.visualIndex >= 0) {
786 compare = a.visualIndex < b.visualIndex;
787 } else {
788 compare = a.logicalIndex < b.logicalIndex;
789 }
790 return compare;
791 }

References logicalIndex, and visualIndex.

Member Data Documentation

◆ advance

QPointF KoSvgTextCharacterInfo::advance

Definition at line 773 of file KoSvgTextShape.h.

◆ finalPos

QPointF KoSvgTextCharacterInfo::finalPos

Definition at line 772 of file KoSvgTextShape.h.

◆ logicalIndex

int KoSvgTextCharacterInfo::logicalIndex = -1

Definition at line 776 of file KoSvgTextShape.h.

◆ metrics

KoSvgText::FontMetrics KoSvgTextCharacterInfo::metrics

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

Definition at line 779 of file KoSvgTextShape.h.

◆ middle

bool KoSvgTextCharacterInfo::middle = false

Definition at line 778 of file KoSvgTextShape.h.

◆ rotateDeg

qreal KoSvgTextCharacterInfo::rotateDeg

Definition at line 774 of file KoSvgTextShape.h.

◆ rtl

bool KoSvgTextCharacterInfo::rtl = false

Definition at line 777 of file KoSvgTextShape.h.

◆ visualIndex

int KoSvgTextCharacterInfo::visualIndex = -1

Definition at line 775 of file KoSvgTextShape.h.


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