GNOME Bugzilla – Bug 790911
Stroke is jaggy in Tiling Symmetry Painting
Last modified: 2017-11-29 00:18:12 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.
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.
This happened because gimp_tiling_update_strokes() mixed integer and double calculations. The right way is to calculate all coordinates in double.
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 <firstname.lastname@example.org>
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(-)