After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790911 - Stroke is jaggy in Tiling Symmetry Painting
Stroke is jaggy in Tiling Symmetry Painting
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other Windows
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2017-11-27 17:14 UTC by shark0r
Modified: 2017-11-29 00:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example of jaggy stroke (6.25 KB, image/png)
2017-11-27 17:14 UTC, shark0r
  Details
a patch try to fix this bug (2.66 KB, patch)
2017-11-27 17:27 UTC, shark0r
committed Details | Review

Description shark0r 2017-11-27 17:14:45 UTC
Created attachment 364517 [details]
example of jaggy stroke

Draw two strokes with a 2px brush. (see the attachment)

Left: without Symmetry Painting 
Right: with Symmetry Painting in Tiling mode

The right one is a little jaggy and not as smooth as the left one.
Mirror and mandala modes don't have this problem.

I have checked the codes. It seems that stroke positions are calculated in integer rather than double, in gimp_tiling_update_strokes(), gimpsymmetry-tiling.c.
Comment 1 shark0r 2017-11-27 17:27:32 UTC
Created attachment 364519 [details] [review]
a patch try to fix this bug

I made a patch that try to fix this problem.

I checked this bug too. I have verified that this modification didn't bring back the "off by one pixel" problem.
https://bugzilla.gnome.org/show_bug.cgi?id=779827

This happened because gimp_tiling_update_strokes() mixed integer and double calculations. The right way is to calculate all coordinates in double.
Comment 2 Jehan 2017-11-29 00:17:09 UTC
Review of attachment 364519 [details] [review]:

Reviewed. That looks good.
Only details are our coding style guidelines: we separate function name and parenthese by a space and I reordered the math.h include by alphabetical order.
I fixed these directly in your patch and pushed it. Thanks!

commit 10e3295581cfb05390f2e5b9e8c86578b9768e25 (HEAD -> master, origin/master, origin/HEAD)
Author: shark0r <b91502038@ntu.edu.tw>
Date:   Tue Nov 28 01:01:24 2017 +0800

    Bug 790911 - fix jaggy stroke in Tiling Symmetry Painting

 app/core/gimpsymmetry-tiling.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)