David Gowers (00a...@gmail.com) wrote:
> On Tue, Jun 16, 2009 at 2:41 PM, DJ<delphit...@yahoo.com> wrote:
> > Hi Gimp-user,
> >
> > After creating a rectangle with the Rectangle Select Tool, rotating it
> > -40 degrees, I selected Edit > Stroke Selection. I clicked the radio
> > button next to "Stroke with a paint tool" and then Paintbrush in the
> > "Paint tool" drop down.
> >
> > I then created a rectangle parallel to the one above using the "same"
> > Paintbrush. I made no changes to the Paintbrush Tool Options. I
> > created this rectangle freehand, clicking where the 4 corners would be
> > while holding the shift key.
> >
> > Should the 2 painted rectangles look alike?
> No. I understand your problem now.
Sorry, apparently not  :-)

> The rectangle selection you made is constraining painting during the
> stroking of the selection., just like any other selection would. If
> you want the stroking to disregard the selection when applying paint,
> you are better off converting the selection to a path then stroking
> the path (with no selection active).
No, stroking the selection is *not* constrained by the selection itself
as you can easily check by using a thicker brush (or looking at the
opposite side of the rotated rectangle).

What DJ probably is referring to is, that stroking the selection of a
-40° rotated rectangle is not the same as manually painting the 4 lines
that form the boundary of the original rectangle.

This is in fact a problem with how stroking a selection is currently
handled. You're actually stroking a line following the marching ants,
and if you zoom into the rotated rectangular selection you'll notice,
that they don't consist of 4 lines describing the rectangle, but
actually are composed from very small horizontal and vertical segments
between the pixel boundaries.

This actually makes a difference: the distance along this stairs between
two corners is longer than a line connecting just the endpoints, which
also implies that the spacing of the brush looks tighter. Also the fact
that the segments always are on exact pixel boundaries means, that you
hit a specific case for the brush interpolation, under some
circumstances giving the effect of no antialiasing at all.

So, this is the problem you're seeing. And it is not easy to fix,
I tried.

Workarounds typically go along the lines of converting the selection to
a path and then stroking the path. The conversion to a path tries to get
rid of these tiny segments and can do this better than the code for

Hope this helps,

              si...@budig.de              http://simon.budig.de/
Gimp-user mailing list

Reply via email to