Bug 417813

Summary: Measure Tool should support setting the arbitrary base line to compare to
Product: [Applications] krita Reporter: Melvin Vermeeren <mail>
Component: Tool/AssistantsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: mail
Priority: NOR    
Version First Reported In: 4.2.8   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: measuring a v in gimp

Description Melvin Vermeeren 2020-02-18 03:27:13 UTC
Created attachment 126112 [details]
measuring a v in gimp

SUMMARY
The measure tool cannot measure between two non-horizontal lines.

STEPS TO REPRODUCE
1. Draw the letter V on a canvas, make it big.
1. Select the measure tool.
2. Try to measure an angle between between the two lines of the V.

OBSERVED RESULT
The measure tool snaps to perfect horizontal. Unless you draw one of the two lines of your V perfectly horizontally it is not easy to measure the angle between the two lines.

EXPECTED RESULT
Some method to specify two lines to measure angle between.

SOFTWARE/OS VERSIONS
Krita 4.2.8, manual backport.

ADDITIONAL INFORMATION
GIMP's measure tool can do this if you hold shift and click on the start point after setting the first measurement line. See the attachment.
Comment 1 Dmitry Kazakov 2023-10-21 12:03:49 UTC
Git commit 1e37236e1144bbfdfa67cb73ad91517bc454bb49 by Dmitry Kazakov, on behalf of Bip Boop.
Committed on 21/10/2023 at 14:03.
Pushed by dkazakov into branch 'master'.

Implement ctrl+stroke for measure tool to change the baseline

Holding the ctrl key sets the baseline to the current 
measure line to measure angles with non horizontal baseline.

M  +29   -13   plugins/tools/basictools/kis_tool_measure.cc
M  +6    -9    plugins/tools/basictools/kis_tool_measure.h

https://invent.kde.org/graphics/krita/-/commit/1e37236e1144bbfdfa67cb73ad91517bc454bb49
Comment 2 Dmitry Kazakov 2023-10-21 12:05:49 UTC
Git commit 69d24cb4a137095f60109616f53b000fe2494d6f by Dmitry Kazakov, on behalf of Bip Boop.
Committed on 21/10/2023 at 14:05.
Pushed by dkazakov into branch 'krita/5.2'.

Implement ctrl+stroke for measure tool to change the baseline

Holding the ctrl key sets the baseline to the current 
measure line to measure angles with non horizontal baseline.


(cherry picked from commit 1e37236e1144bbfdfa67cb73ad91517bc454bb49)

M  +29   -13   plugins/tools/basictools/kis_tool_measure.cc
M  +6    -9    plugins/tools/basictools/kis_tool_measure.h

https://invent.kde.org/graphics/krita/-/commit/69d24cb4a137095f60109616f53b000fe2494d6f