Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSvgConvertTextTypeCommand.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
7
9 : KUndo2Command(parent)
10 , m_shape(shape)
11 , m_conversionType(type)
12 , m_pos(pos)
13{
14 setText(kundo2_i18n("Convert Text Type"));
15}
16
35
void setText(const KUndo2MagicString &text)
virtual void updateAbsolute(const QRectF &rect) const
Definition KoShape.cpp:616
KoSvgConvertTextTypeCommand(KoSvgTextShape *shape, KoSvgTextShape::TextType type, int pos, KUndo2Command *parent=0)
KoSvgTextShape::TextType m_conversionType
void notifyCursorPosChanged(int pos, int anchor)
Notify that the cursor position has changed.
KoSvgTextShapeMementoSP getMemento()
Get a memento holding the current textdata and layout info.
void setMemento(const KoSvgTextShapeMementoSP memento)
Set the text data and layout info, reset listening cursors to 0.
QRectF boundingRect() const override
Get the bounding box of the shape.
int indexForPos(int pos) const
indexForPos get the string index for a given cursor position.
@ PreformattedText
Text-on-Path falls under this or PrePositionedText depending on collapse of lines.
@ InlineWrap
Uses inline size to wrap and preserves spaces.
int posForIndex(int index, bool firstIndex=false, bool skipSynthetic=false) const
posForIndex Get the cursor position for a given index in a string.
void setCharacterTransformsFromLayout()
setCharacterTransformsFromLayout Converts the text to a prepositioned SVG 1.1 text....
void convertCharTransformsToPreformatted(bool makeInlineSize=false)
convertCharTransformsToPreformatted Converts the text to a preformatted SVG 2.0 text....
KUndo2MagicString kundo2_i18n(const char *text)