Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
6fd50444
Commit
6fd50444
authored
Nov 06, 2012
by
Sven Langkamp
Browse files
keep aspect ration when inserting artistic text with the text tool
BUG:305323
parent
b8789329
Changes
1
Hide whitespace changes
Inline
Side-by-side
krita/plugins/tools/tool_text/kis_tool_text.cc
View file @
6fd50444
...
...
@@ -55,6 +55,11 @@ void KisToolText::finishRect(const QRectF &rect)
if
(
textFactory
)
{
KoShape
*
shape
=
textFactory
->
createDefaultShape
(
canvas
()
->
shapeController
()
->
resourceManager
());
shape
->
setPosition
(
rect
.
topLeft
());
// If the shape is an artistic shape we keep the aspect ration so the text isn't streched
if
(
shapeString
==
"ArtisticText"
)
{
qreal
ratio
=
rect
.
height
()
/
shape
->
size
().
height
();
r
.
setWidth
(
shape
->
size
().
width
()
*
ratio
);
}
shape
->
setSize
(
r
.
size
());
addShape
(
shape
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment