Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix following existing shape in the Calligraphy Tool

Dmitry Kazakov063b4d386ae0
diff --git a/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp b/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp
index 0fedd0a64c..8fb2c61d7e 100644
--- a/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp
+++ b/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyTool.cpp
@@ -151,7 +151,7 @@ void KarbonCalligraphyTool::addPoint(KoPointerEvent *event)
{
if (m_pointCount == 0) {
if (m_usePath && m_selectedPath) {
- m_selectedPathOutline = m_selectedPath->outline();
+ m_selectedPathOutline = m_selectedPath->absoluteTransformation().map(m_selectedPath->outline());
}
m_pointCount = 1;
m_endOfPath = false;
@@ -239,8 +239,7 @@ QPointF KarbonCalligraphyTool::calculateNewPoint(const QPointF &mousePos, QPoint
t = m_selectedPathOutline.percentAtLength(m_followPathPosition);
}
- QPointF res = m_selectedPathOutline.pointAtPercent(t)
- + m_selectedPath->position();
+ QPointF res = m_selectedPathOutline.pointAtPercent(t);
*speed = res - m_lastPoint;
return res;
}