Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSvgTextShapeLayoutFunc.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 * SPDX-FileCopyrightText: 2022 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KO_SVG_TEXT_SHAPE_LAYOUT_FUNC_H
9#define KO_SVG_TEXT_SHAPE_LAYOUT_FUNC_H
10
11#include "KoSvgTextShape_p.h"
12
14{
15
16void calculateLineHeight(CharacterResult cr, double &ascent, double &descent, bool isHorizontal, bool compare = false);
17
19 QPointF &currentPos,
20 QVector<int> &wordIndices,
21 LineBox &currentLine,
22 bool isHorizontal);
23
25 QPointF &currentPos,
26 LineBox &currentLine,
27 QPointF &lineOffset,
28 const KoSvgText::TextAnchor anchor,
29 const KoSvgText::WritingMode writingMode,
30 const bool ltr,
31 const bool inlineSize,
32 const bool textInShape,
33 const KoSvgText::ResolutionHandler &resHandler);
34
36 const QMap<int, int> &logicalToVisual,
38 QPointF startPos, const KoSvgText::ResolutionHandler &resHandler);
39
41getShapes(QList<KoShape *> shapesInside, QList<KoShape *> shapesSubtract, const KoSvgTextProperties &properties);
42
44 const QMap<int, int> &logicalToVisual,
46 QList<QPainterPath> shapes, QPointF &startPos, const KoSvgText::ResolutionHandler &resHandler);
47
48} // namespace KoSvgTextShapeLayoutFunc
49
50#endif // KO_SVG_TEXT_SHAPE_LAYOUT_FUNC_H
void calculateLineHeight(CharacterResult cr, double &ascent, double &descent, bool isHorizontal, bool compare=false)
calculateLineHeight calculate the total ascent and descent (including baseline-offset) of a charResul...
QVector< LineBox > flowTextInShapes(const KoSvgTextProperties &properties, const QMap< int, int > &logicalToVisual, QVector< CharacterResult > &result, QList< QPainterPath > shapes, QPointF &startPos, const KoSvgText::ResolutionHandler &resHandler)
void finalizeLine(QVector< CharacterResult > &result, QPointF &currentPos, LineBox &currentLine, QPointF &lineOffset, const KoSvgText::TextAnchor anchor, const KoSvgText::WritingMode writingMode, const bool ltr, const bool inlineSize, const bool textInShape, const KoSvgText::ResolutionHandler &resHandler)
QList< QPainterPath > getShapes(QList< KoShape * > shapesInside, QList< KoShape * > shapesSubtract, const KoSvgTextProperties &properties)
QVector< LineBox > breakLines(const KoSvgTextProperties &properties, const QMap< int, int > &logicalToVisual, QVector< CharacterResult > &result, QPointF startPos, const KoSvgText::ResolutionHandler &resHandler)
void addWordToLine(QVector< CharacterResult > &result, QPointF &currentPos, QVector< int > &wordIndices, LineBox &currentLine, bool isHorizontal)
addWordToLine Small function used in break lines to quickly add a 'word' to the current line....
TextAnchor
Where the text is anchored for SVG 1.1 text and 'inline-size'.
Definition KoSvgText.h:79
The ResolutionHandler class.
Definition KoSvgText.h:1084
The LineBox struct.