Bug 434806

Summary: Deform Brush engine "Angle" parameter rotates brush by radians instead of degrees
Product: [Applications] krita Reporter: Stephen <stwelin>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard
Priority: NOR    
Version First Reported In: 4.4.2   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: deform brush with the "angle" setting highlighted
Move deform brush angle 1 degree change is too drastic

Description Stephen 2021-03-23 00:19:18 UTC
Created attachment 136961 [details]
deform brush with the "angle" setting highlighted

SUMMARY

Deform Brush engine "Angle" setting indicates degrees, but rotates by radians.


STEPS TO REPRODUCE
1. Create a new deform brush
2. Change the Aspect setting to achieve a thin (eccentric) ellipse.
3. Change the Angle setting by a single degree.

OBSERVED RESULT

The brush shape is angled by a very large amount – much more than a single degree.

EXPECTED RESULT

Deform brush "Angle" setting rotates brush by degrees.


SOFTWARE/OS VERSIONS
macOS: 11.2
Comment 1 Ahab Greybeard 2021-03-23 14:09:02 UTC
With the 4.4.2 appimage on Debian 10, the Angle setting gives rotation of the brush tip by degrees. Is this a MacOS specific bug?
Comment 2 Stephen 2021-03-23 14:49:02 UTC
Created attachment 136987 [details]
Move deform brush angle 1 degree change is too drastic
Comment 3 Stephen 2021-03-23 14:52:21 UTC
I don't think this is MacOS specific.

I missed some details in my report:
1.) I'm using the "Move" type of deform brush
2.) The cursor shape of the brush appears at the correct angle, but the actual application of the brush is wrong.

I've attached a short video to illustrate the issue. In the video, notice that I change the "Angle" parameter by 1 degree. The preview cursor of the brush appears to hardly change (expected), but when I use the brush, the angle is totally different. That is why I suspect somewhere that the "Angle" value is not converted to degrees when the brush is used on the canvas.

https://bugs.kde.org/attachment.cgi?id=136987
Comment 4 Ahab Greybeard 2021-03-23 16:01:09 UTC
Yes, I see what you mean now.
For 1 degree, the angle of effect is about 1 radian and for 3 degrees (no decimals) the effect looks like 3 radians (almost 180 degrees).

I can confirm this for appimages on Debian 10 as follows: 4.3.0, 4.4.2, Mar 22 4.4.4 alpha (git a8ab3f0).
Comment 5 vanyossi 2021-04-10 00:40:53 UTC
Git commit 1222798f0aadf4d69a5cef6fd332c169ebb6c6bd by Ivan Yossi.
Committed on 10/04/2021 at 00:40.
Pushed by ivany into branch 'master'.

Rotate deform brush using degrees instead of radians

This also ensures the rotation outline rotates in the same
direction as the widget visual representation.

M  +3    -3    plugins/paintops/deform/deform_brush.cpp
M  +1    -1    plugins/paintops/deform/kis_deform_paintop_settings.cpp

https://invent.kde.org/graphics/krita/commit/1222798f0aadf4d69a5cef6fd332c169ebb6c6bd