GNOME Bugzilla – Bug 134410
Interpolation problem with paint tools
Last modified: 2004-12-22 21:47:04 UTC
Open up a new image, choose e.g. Circle (19) as brush, set the view to 1:1 and click in the image to paint the brush. Then create a vertical line by SHIFT-CTRL-clicking under the starting point. Now have a look at the top of the line and realize that the first click apparently is not really the starting point of the line. And indeed it is not. The bugfix to bug #84145 moves start- and endpoint of a straight line to the center of the pixel, but the regular painting code does not do this. So the first click placed the brush at e.g. (40.0, 50.0) but the line started at (40.5, 50.5). I propose to just do this offsetting of line start/endpoints only when the paint tool is in hard mode. This would leave #84145 fixed and also fixes the annoying behaviour described above. It also enables the user to draw straight lines with subpixel-positioned start- and endpoints. I have a patch sitting in the queue that basically is ready to be committed. I opened this bug to give Henning a chance to comment - he mentioned that this is the behaviour he intended. This bug does not adress the zoom-level-dependant coordinates issue.
That seems like a sane compromise - I say go for it. Dave.
Fixed in CVS: 2004-02-18 Simon Budig <simon@gimp.org> * app/display/gimpdisplayshell.c * app/tools/gimpmovetool.c: Adjusted snapping distance to 8 pixels, probably should be a preferences option. * app/tools/gimppainttool.c: Do not center the start and end of a straight line to the center of an image-pixel unless the brush mode is GIMP_BRUSH_HARD. Fixes bug #134410.