Commit 44b7ca2c authored by Juan Palacios's avatar Juan Palacios
Browse files

Fixed aspect ratio computation of artistic text shape

Aspect ratio was not being computed correctly. Now artistic shape
maintain the aspect ratio of the box used to define the text area,
keeping the defined height and extending the width to accommodate the
predefined text.

CCBUG: 305323
parent b69f9706
......@@ -110,8 +110,8 @@ void KisToolText::finishRect(const QRectF &rect)
// If the shape is an artistic shape we keep the aspect ratio so the text isn't stretched
if (shapeString == "ArtisticText") {
qreal ratio = rect.height()/shape->size().height();
qreal ratio = shape->size().width() / shape->size().height();
r.setWidth(convertToPt(rect).height() * ratio);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment