|
Krita Source Code Documentation
|
#include <KoSvgTextShape_p.h>
Public Member Functions | |
| LineChunk | chunk () |
| void | clearAndAdjust (bool isHorizontal, QPointF current, QPointF indent) |
| bool | isEmpty () |
| LineBox () | |
| LineBox (QPointF start, QPointF end, const KoSvgText::ResolutionHandler &resHandler) | |
| LineBox (QVector< QLineF > lineWidths, bool ltr, QPointF indent, const KoSvgText::ResolutionHandler &resHandler) | |
| void | setCurrentChunk (LineChunk chunk) |
| void | setCurrentChunkForPos (QPointF pos, bool isHorizontal) |
Public Attributes | |
| qreal | actualLineBottom = 0 |
| qreal | actualLineTop = 0 |
| QPointF | baselineBottom = QPointF() |
| Used to identify the bottom of the line for baseline-alignment. | |
| QPointF | baselineTop = QPointF() |
| Used to identify the top of the line for baseline-alignment. | |
| QVector< LineChunk > | chunks |
| int | currentChunk = -1 |
| qreal | expectedLineTop = 0 |
| Because fonts can affect lineheight mid-line, and this affects wrapping, this estimates the line-height. | |
| bool | firstLine = false |
| bool | justifyLine = false |
| bool | lastLine = false |
| bool | lineFinalized = false |
| QPointF | textIndent = QPointF() |
The LineBox struct.
The line box struct is to simplify keeping track of lines inside the wrapping functions. It somewhat corresponds to CSS line boxes, with the caveat that formally, a line split in two in CSS/SVG would be two line boxes, while we instead have two line chunks in a single line box. This is necessary to ensure we can calculate the same line height for boxes split by a shape.
CSS-Inline-3 defines Line Boxes here: https://www.w3.org/TR/css-inline-3/#line-box CSS-Text-3 briefly talks about them here: https://www.w3.org/TR/css-text-3/#bidi-linebox SVG-2 chapter text talks about them here: https://svgwg.org/svg2-draft/text.html#TextLayoutAutoNotes
What is important to us is that all the above specifications, when they talk about Bidi-reordering, agree that the order is dependant on the paragraph/block level direction, and is not affected by the inline content changing direction. Which is good, because that'd make things super hard.
Definition at line 298 of file KoSvgTextShape_p.h.
|
inline |
Definition at line 300 of file KoSvgTextShape_p.h.
|
inline |
Definition at line 303 of file KoSvgTextShape_p.h.
References KoSvgText::ResolutionHandler::adjustCeil(), KoSvgText::ResolutionHandler::adjustFloor(), chunk(), chunks, currentChunk, and LineChunk::length.
|
inline |
Definition at line 310 of file KoSvgTextShape_p.h.
References KoSvgText::ResolutionHandler::adjustCeil(), KoSvgText::ResolutionHandler::adjustFloor(), chunk(), chunks, currentChunk, LineChunk::length, and textIndent.
|
inline |
Definition at line 345 of file KoSvgTextShape_p.h.
References chunks, and currentChunk.
|
inline |
Definition at line 358 of file KoSvgTextShape_p.h.
References actualLineBottom, actualLineTop, chunk(), chunks, currentChunk, firstLine, LineChunk::length, length(), and textIndent.
|
inline |
Definition at line 349 of file KoSvgTextShape_p.h.
References chunk(), chunks, and currentChunk.
|
inline |
Definition at line 378 of file KoSvgTextShape_p.h.
References chunk(), chunks, currentChunk, LineChunk::length, and SHAPE_PRECISION.
| qreal LineBox::actualLineBottom = 0 |
Definition at line 334 of file KoSvgTextShape_p.h.
| qreal LineBox::actualLineTop = 0 |
Definition at line 333 of file KoSvgTextShape_p.h.
| QPointF LineBox::baselineBottom = QPointF() |
Used to identify the bottom of the line for baseline-alignment.
Definition at line 337 of file KoSvgTextShape_p.h.
| QPointF LineBox::baselineTop = QPointF() |
Used to identify the top of the line for baseline-alignment.
Definition at line 336 of file KoSvgTextShape_p.h.
Definition at line 329 of file KoSvgTextShape_p.h.
| int LineBox::currentChunk = -1 |
Definition at line 330 of file KoSvgTextShape_p.h.
| qreal LineBox::expectedLineTop = 0 |
Because fonts can affect lineheight mid-line, and this affects wrapping, this estimates the line-height.
Definition at line 332 of file KoSvgTextShape_p.h.
| bool LineBox::firstLine = false |
Definition at line 340 of file KoSvgTextShape_p.h.
| bool LineBox::justifyLine = false |
Definition at line 343 of file KoSvgTextShape_p.h.
| bool LineBox::lastLine = false |
Definition at line 341 of file KoSvgTextShape_p.h.
| bool LineBox::lineFinalized = false |
Definition at line 342 of file KoSvgTextShape_p.h.
| QPointF LineBox::textIndent = QPointF() |
Definition at line 339 of file KoSvgTextShape_p.h.