GNOME Bugzilla – Bug 698551
Brush radius, pencil size and drawn result all getting confused
Last modified: 2013-05-13 00:23:18 UTC
Repeat these steps to see the problems. 1) Create image 16x16, define 1 pixel grid. 2) Select Pencil tool 3) Create a new brush, shape square, radius 2.0. 4) In tool options of the pencil tool, click the yellow arrow (Reset size to brush's native size). Result: Size 5. Problem 1: Should that be 4? 5) Now draw with size 5, 6 and 7: Result: a square of dimension 5x5 is drawn. 6) Now draw with size 8 and 9: Result: a square with dimension 7x7 is drawn. Problem 2: The selected size does not match what is drawn. 7) Edit the brush radius to 0.6, press "Reset size to brush's native size" in the tool option. Result: size 3. Draw: Result: 1x1 pixel is drawn. Set size to 4, 5, 6, 7 an 8. Draw. Result: 3x3 pixels are drawn. Problem as above. 8) Edit the brush radius to 1.0, press "Reset size to brush's native size" in the tool option. Result: size 3. Draw: Result: 3x3 pixels are drawn. Set size to 4, 5. Draw: Result: 3x3 pixels are drawn. Set size to 6, 7 and 8. Draw. Result: 5x5 pixels are drawn. Problem as above. The variations are endless. 9) Define a brush, radius 2.0, circle, press "Reset size to brush's native size" in the tool option. Result: size 5. Set size to 5, 6 and 7. Draw. Result: A "circle" is drawn, the diameter is always 5. At size 7 a solid square 5x5 is drawn. Surely it's hard to draw a circle with so few pixels, but neither the size nor the shape are correct. Problem 3: With circular brushes the selected size doesn't match what is drawn and the rasterization is somewhat sub-optimal.
The actual problem here is that the buffer which contains the brush is larger than the visible shape, and the painting algorithms all use the buffer size to calculate things. This is essentially a duplicate of bug 419256. *** This bug has been marked as a duplicate of bug 419256 ***