GNOME Bugzilla – Bug 596472
Rotate brushes artifacts at certain rotation angles
Last modified: 2009-09-29 21:05:20 UTC
Created attachment 144090 [details] [review] Bugfix for rotate brushes artifacts at certain rotation angles I found and solved a new bug in the bilinear interpolated transform algorithm that sometimes caused artifacting on a brush edge for brushes rotated 90, -90, -180, or 180 degrees. The key to solving it was using non premultiplied x y coordinate values in the if-tests for determining where an inverse-transformed pixel is located in source-image space. The bugfix patch is attached.
I've just discovered that this patch introduces small artifacts when some brushes are scaled > 1 where sometimes a pixel appears one pixel north-west of the top left corner. Affected brushes seem to be those that have pixels all along the top edge or left edge pixels at y coordinates 1 or 2 (where 0 is the top row). I will attempt to solve this, but if in the meantime someone else solves the problem, feel free to post a patch below.
Created attachment 144294 [details] [review] Patch that fixes new artifact introduced by previous patch
I've merged the two patches and some white-space and formatting cleanup into a single commit and pushed it to the master branch. Thanks for your contribution.