RSS/Atom feed Twitter
Site is read-only, email is disabled

Edit > Stroke Selection, Paint Tool=Paintbrush verses using the same Paintbrush Tool directly

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

DJ
2009-06-16 07:11:49 UTC (over 15 years ago)

Edit > Stroke Selection, Paint Tool=Paintbrush verses using the same Paintbrush Tool directly

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?

Even though I used the "same" Paintbrush, the lines of the two rectangles are very different. I would have thought that they would have been the same (and I was going to prove it to myself :-)), since I'm creating colored lines with the same tool (Paintbrush) - one via Stroked Selection, one via freehand. The freehand rectangle has anti-aliasing. The one created by Stroke Selection using the same Paintbrush does not. The lines are very choppy. Did I miss an option in the Stroke Selection Dialog? I tried some of the options in the Rectangle Select Tool, before Rotating and Stroking, but they didn't change anything. I'm not sure why in the Rectangle Select Tool anti-aliasing is grayed out unless rounded corners is enabled. In one try, I made rounded corners radius 0 and anti-aliasing enabled before rotating and stroking the selection. No difference.

I'm using Paintbrush Circle (01), Scale 3.

I'm great at creating straight lines on 180 or 90 degrees :-), but add an angle, slant (like above) or a curve, and I need a little more practice.

Thank you.

David Gowers
2009-06-16 07:35:33 UTC (over 15 years ago)

Edit > Stroke Selection, Paint Tool=Paintbrush verses using the same Paintbrush Tool directly

On Tue, Jun 16, 2009 at 2:41 PM, DJ 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.

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).

To illustrate -- use the paths tool to create a rectangle, and stroke that path. The resultant stroking should display exactly the same appearance as your freehand rectangle.

David

Simon Budig
2009-06-16 10:46:08 UTC (over 15 years ago)

Edit > Stroke Selection, Paint Tool=Paintbrush verses using the same Paintbrush Tool directly

David Gowers (00ai99@gmail.com) wrote:

On Tue, Jun 16, 2009 at 2:41 PM, DJ 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 stroking.

Hope this helps,
Simon