MCPcopy Create free account
hub / github.com/KDE/krita / handleMouseMove

Method handleMouseMove

libs/flake/tools/KoPathControlPointMoveStrategy.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void KoPathControlPointMoveStrategy::handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers)
32{
33 QPointF docPoint = m_tool->canvas()->snapGuide()->snap(mouseLocation, modifiers);
34 QPointF localPos = m_path->documentToShape(docPoint);
35 QPointF move = localPos - m_path->documentToShape(m_lastPosition);
36 // as the last position can change when the top left is changed we have
37 // to save it in document pos and not in shape pos
38 m_lastPosition = docPoint;
39
40 m_move += move;
41
42 KisCommandUtils::redoAndMergeIntoAccumulatingCommand(
43 new KoPathControlPointMoveCommand(m_pointData, move, m_pointType),
44 m_intermediateCommand);
45}
46
47void KoPathControlPointMoveStrategy::finishInteraction(Qt::KeyboardModifiers modifiers)
48{

Callers

nothing calls this directly

Calls 5

snapGuideMethod · 0.80
documentToShapeMethod · 0.80
snapMethod · 0.45
canvasMethod · 0.45

Tested by

no test coverage detected