|
Krita Source Code Documentation
|
#include <KoSvgTextShape_p.h>
Public Member Functions | |
| void | calculateAndApplyTabsize (QPointF currentPos, bool isHorizontal, const KoSvgText::ResolutionHandler &resHandler) |
| QTransform | finalTransform () const |
| QRectF | layoutBox () const |
| layoutBox | |
| QRectF | lineHeightBox () const |
| lineHeightBox | |
| void | scaleCharacterResult (qreal xScale, qreal yScale) |
| scaleCharacterResult convenience function to scale the whole character result. | |
| QPointF | totalBaselineOffset () const |
| void | translateOrigin (QPointF newOrigin) |
| translateOrigin For dominant baseline, we want to move the glyph origin. This encompassed the glyph, the ascent and descent, and the metrics. | |
Public Attributes | |
| bool | addressable = true |
| QPointF | advance |
| KoSvgText::TextAnchor | anchor = KoSvgText::AnchorStart |
| bool | anchored_chunk = false |
| whether this is the start of a new chunk. | |
| QPointF | baselineOffset = QPointF() |
| BreakType | breakType = BreakType::NoBreak |
| QPointF | cssPosition = QPointF() |
| the position in accordance with the CSS specs, as opossed to the SVG spec. | |
| CursorInfo | cursorInfo |
| KoSvgText::Direction | direction = KoSvgText::DirectionLeftToRight |
| QPointF | dominantBaselineOffset = QPointF() |
| qreal | extraFontScaling = 1.0 |
| Freetype doesn't allow us to scale below 1pt, so we need to do an extra transformation in these cases. | |
| QPointF | finalPosition |
| the final position, taking into account both CSS and SVG positioning considerations. | |
| qreal | fontHalfLeading |
| Leading for both sides, can be either negative or positive. | |
| QFont::Style | fontStyle = QFont::StyleNormal |
| int | fontWeight = 400 |
| Glyph::Variant | glyph |
| bool | hidden = false |
| QRectF | inkBoundingBox |
| The bounds of the drawn glyph. Different from the bounds the charresult takes up in the layout,. | |
| bool | isHanging = false |
| bool | isHorizontal = true |
| Whether the current glyph lays out horizontal or vertical. Currently same as paragraph, but in future may change. | |
| bool | justifyAfter = false |
| Justification Opportunity follows this character. | |
| bool | justifyBefore = false |
| Justification Opportunity precedes this character. | |
| LineEdgeBehaviour | lineEnd = LineEdgeBehaviour::NoChange |
| LineEdgeBehaviour | lineStart = LineEdgeBehaviour::NoChange |
| KoSvgText::FontMetrics | metrics |
| Fontmetrics for current font, in Freetype scanline coordinates. | |
| bool | middle = false |
| bool | overflowWrap = false |
| int | plaintTextIndex = -1 |
| qreal | rotate = 0.0 |
| qreal | scaledAscent {} |
| Ascender, in pt. | |
| qreal | scaledDescent {} |
| Descender, in pt. | |
| qreal | scaledHalfLeading {} |
| Leading for both sides, can be either negative or positive, in pt. | |
| std::optional< qreal > | tabSize |
| If present, this is a tab and it should align to multiples of this tabSize value. | |
| bool | textLengthApplied = false |
| int | visualIndex = -1 |
Definition at line 90 of file KoSvgTextShape_p.h.
|
inline |
Definition at line 133 of file KoSvgTextShape_p.h.
References KoSvgText::ResolutionHandler::adjust(), advance, isHorizontal, and tabSize.
|
inline |
Definition at line 266 of file KoSvgTextShape_p.h.
References finalPosition, and rotate.
|
inline |
layoutBox
Definition at line 147 of file KoSvgTextShape_p.h.
References advance, isHorizontal, scaledAscent, and scaledDescent.
|
inline |
lineHeightBox
Definition at line 155 of file KoSvgTextShape_p.h.
References isHorizontal, layoutBox(), and scaledHalfLeading.
|
inline |
scaleCharacterResult convenience function to scale the whole character result.
| xScale | – the factor by which the width should be scaled. |
| yScale | – the factor by which the height should be scaled. |
Definition at line 197 of file KoSvgTextShape_p.h.
References advance, CursorInfo::caret, cursorInfo, glyph, inkBoundingBox, isHorizontal, metrics, CursorInfo::offsets, KoSvgText::FontMetrics::scaleBaselines(), scaledAscent, scaledDescent, scaledHalfLeading, and tabSize.
|
inline |
Definition at line 254 of file KoSvgTextShape_p.h.
References baselineOffset, and dominantBaselineOffset.
|
inline |
translateOrigin For dominant baseline, we want to move the glyph origin. This encompassed the glyph, the ascent and descent, and the metrics.
Definition at line 166 of file KoSvgTextShape_p.h.
References CursorInfo::caret, cursorInfo, glyph, inkBoundingBox, isHorizontal, scaledAscent, and scaledDescent.
| bool CharacterResult::addressable = true |
whether the character is not discarded for various reasons, this is necessary for determining to which index a given x/y transform is applied, and in this code we also use it to determine if a character is considered for line-breaking.
Definition at line 97 of file KoSvgTextShape_p.h.
| QPointF CharacterResult::advance |
Definition at line 114 of file KoSvgTextShape_p.h.
| KoSvgText::TextAnchor CharacterResult::anchor = KoSvgText::AnchorStart |
Definition at line 263 of file KoSvgTextShape_p.h.
| bool CharacterResult::anchored_chunk = false |
whether this is the start of a new chunk.
Definition at line 102 of file KoSvgTextShape_p.h.
| QPointF CharacterResult::baselineOffset = QPointF() |
The computed baseline offset, will be applied when calculating the line-offset during line breaking.
Definition at line 112 of file KoSvgTextShape_p.h.
| BreakType CharacterResult::breakType = BreakType::NoBreak |
Definition at line 115 of file KoSvgTextShape_p.h.
| QPointF CharacterResult::cssPosition = QPointF() |
the position in accordance with the CSS specs, as opossed to the SVG spec.
Definition at line 110 of file KoSvgTextShape_p.h.
| CursorInfo CharacterResult::cursorInfo |
Definition at line 261 of file KoSvgTextShape_p.h.
| KoSvgText::Direction CharacterResult::direction = KoSvgText::DirectionLeftToRight |
Definition at line 264 of file KoSvgTextShape_p.h.
| QPointF CharacterResult::dominantBaselineOffset = QPointF() |
Definition at line 111 of file KoSvgTextShape_p.h.
| qreal CharacterResult::extraFontScaling = 1.0 |
Freetype doesn't allow us to scale below 1pt, so we need to do an extra transformation in these cases.
Definition at line 124 of file KoSvgTextShape_p.h.
| QPointF CharacterResult::finalPosition |
the final position, taking into account both CSS and SVG positioning considerations.
Definition at line 91 of file KoSvgTextShape_p.h.
| qreal CharacterResult::fontHalfLeading |
Leading for both sides, can be either negative or positive.
Definition at line 125 of file KoSvgTextShape_p.h.
| QFont::Style CharacterResult::fontStyle = QFont::StyleNormal |
Definition at line 258 of file KoSvgTextShape_p.h.
| int CharacterResult::fontWeight = 400 |
Definition at line 259 of file KoSvgTextShape_p.h.
| Glyph::Variant CharacterResult::glyph |
Definition at line 104 of file KoSvgTextShape_p.h.
| bool CharacterResult::hidden = false |
Definition at line 93 of file KoSvgTextShape_p.h.
| QRectF CharacterResult::inkBoundingBox |
The bounds of the drawn glyph. Different from the bounds the charresult takes up in the layout,.
Definition at line 106 of file KoSvgTextShape_p.h.
| bool CharacterResult::isHanging = false |
Definition at line 120 of file KoSvgTextShape_p.h.
| bool CharacterResult::isHorizontal = true |
Whether the current glyph lays out horizontal or vertical. Currently same as paragraph, but in future may change.
Definition at line 107 of file KoSvgTextShape_p.h.
| bool CharacterResult::justifyAfter = false |
Justification Opportunity follows this character.
Definition at line 119 of file KoSvgTextShape_p.h.
| bool CharacterResult::justifyBefore = false |
Justification Opportunity precedes this character.
Definition at line 118 of file KoSvgTextShape_p.h.
| LineEdgeBehaviour CharacterResult::lineEnd = LineEdgeBehaviour::NoChange |
Definition at line 116 of file KoSvgTextShape_p.h.
| LineEdgeBehaviour CharacterResult::lineStart = LineEdgeBehaviour::NoChange |
Definition at line 117 of file KoSvgTextShape_p.h.
| KoSvgText::FontMetrics CharacterResult::metrics |
Fontmetrics for current font, in Freetype scanline coordinates.
Definition at line 126 of file KoSvgTextShape_p.h.
| bool CharacterResult::middle = false |
whether the character is the second of last of a typographic character.
Definition at line 100 of file KoSvgTextShape_p.h.
| bool CharacterResult::overflowWrap = false |
Definition at line 122 of file KoSvgTextShape_p.h.
| int CharacterResult::plaintTextIndex = -1 |
Definition at line 109 of file KoSvgTextShape_p.h.
| qreal CharacterResult::rotate = 0.0 |
Definition at line 92 of file KoSvgTextShape_p.h.
| qreal CharacterResult::scaledAscent {} |
| qreal CharacterResult::scaledDescent {} |
| qreal CharacterResult::scaledHalfLeading {} |
Leading for both sides, can be either negative or positive, in pt.
Definition at line 127 of file KoSvgTextShape_p.h.
| std::optional<qreal> CharacterResult::tabSize |
If present, this is a tab and it should align to multiples of this tabSize value.
Definition at line 131 of file KoSvgTextShape_p.h.
| bool CharacterResult::textLengthApplied = false |
Definition at line 121 of file KoSvgTextShape_p.h.
| int CharacterResult::visualIndex = -1 |
Definition at line 108 of file KoSvgTextShape_p.h.