Gimp-Forum.net
Disparities between stroke selection and stroke path - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Disparities between stroke selection and stroke path (/Thread-Disparities-between-stroke-selection-and-stroke-path)



Disparities between stroke selection and stroke path - CtrlAltDel - 06-04-2021

What is the reason for the difference in results between stroke selection and stroke path?  Stroke selection is not perfectly round and not smooth and is twice as large as the stroke path operation performed on the same sized oval design.

Is there any way to get a smooth and true to shape result using stroke selection, or is that not the purpose of stroke selection?

[Image: uPDPTQN.png]


RE: Disparities between stroke selection and stroke path - rickk - 06-05-2021

I noticed the same oddity when stroking selections with the bolt pattern earlier this year.


FWIW, it seems most noticeable when stroking a selection with a line or a pattern (the top   "stroke selection"  dialog choice), but far less if you stroke the selection with a brush (bottom of the "stroke selection" dialog) 

[Image: vFwWCEr.png]

Your question is a good one, I look forward to the explanation.


RE: Disparities between stroke selection and stroke path - CtrlAltDel - 06-05-2021

(06-05-2021, 12:13 AM)rickk Wrote: Your question is a good one, I look forward to the explanation.

Thanks, Rickk.  It's just curiosity that makes me ask the question, I'm not needing to do it right now or anything.  I've noticed what you mention also, with the paintbrush option of stroke selection being smoother, but still not nearly as smooth as stroke path.

Also, stroke selection overflows the boundaries of the selection, unlike stroke path, which draws inside the selection.


RE: Disparities between stroke selection and stroke path - PixLab - 06-05-2021

There is a very old "maxim" in GIMP -> Stroke the path, not the selection.

If you do need to stroke a selection (because you do not want a path or for whatever reasons)
the best way to do it, is once you got your selection circle (for example) go to > Select > Border... and input the size of the thickness, border style (smooth) / OK, then just drop the color you want in from the FG or BG.

This circle was made with the Ellipse tool and a border of 53pixels, it's smooth Wink

[attachment=6126]

Also if you don't want to do a "Border" you can use the line style...
When you stroke a selection be careful of the setting in the "Stroke selection dialogue"
On the "Line Style" select "Round"

[attachment=6127]

This circle was Stroked with a line style -> round (the settings above) it's quite smooth, not perfect, but not bad Wink

[attachment=6128]

Also if you stroke with a brush, put the "Space" setting to 1

[attachment=6129]

Stroked with a brush with the brush setting above, it smooth Wink

[attachment=6130]


RE: Disparities between stroke selection and stroke path - CtrlAltDel - 06-05-2021

(06-05-2021, 03:19 AM)PixLab Wrote:
Quote:There is a very old "maxim" in GIMP -> Stroke the path, not the selection.


Ha, that's a good one.


Quote:If you do need to stroke a selection (because you do not want a path or for whatever reasons)
the best way to do it, is once you got your selection circle (for example) go to > Select > Border... and input the size of the thickness, border style (smooth) / OK, then just drop the color you want in from the FG or BG.

This circle was made with the Ellipse tool and a border of 53pixels, it's smooth

Okay, that looks nice.  It seemed like there should be a way to do that, and there is.



Quote:Also if you don't want to do a "Border" you can use the line style...
When you stroke a selection be careful of the setting in the "Stroke selection dialogue"
On the "Line Style" select "Round"



This circle was Stroked with a line style -> round (the settings above) it's quite smooth, not perfect, but not bad Wink

Thanks a lot, PixLab. I'm saving this post so that when I may try doing this again for some reason, I will have the information you provided handy. 



RE: Disparities between stroke selection and stroke path - rich2005 - 06-05-2021

There is a peculiarity with stroke selection and size. Even size (40 pix) does not have any anti-aliasing, even when anti-aliasing is enabled. Use an odd number.

Most of this mentioned previously. 
This dark blue stroke 40 pix  / light blue stroke 41 pix  and you will get a better shape if you stroke with the paint tool.
That is a 4 pix grid showing, the selection has to follow pixel boundaries, gives that blocky shape. A path is sub-pixel and the density of the fill depends on the amount of the pixel 'captured'


RE: Disparities between stroke selection and stroke path - CtrlAltDel - 06-05-2021

(06-05-2021, 09:11 AM)rich2005 Wrote: There is a peculiarity with stroke selection and size. Even size (40 pix) does not have any anti-aliasing, even when anti-aliasing is enabled. Use an odd number.

Most of this mentioned previously. 
This dark blue stroke 40 pix  / light blue stroke 41 pix  and you will get a better shape if you stroke with the paint tool.
That is a 4 pix grid showing, the selection has to follow pixel boundaries, gives that blocky shape. A path is sub-pixel and the density of the fill depends on the amount of the pixel 'captured'

Thanks, Rich.  I never would have known, in a million years, that odd #'s are better.  Great illustrations to visually explain what happens.


RE: Disparities between stroke selection and stroke path - PixLab - 06-05-2021

(06-05-2021, 09:11 AM)rich2005 Wrote: There is a peculiarity with stroke selection and size. Even size (40 pix) does not have any anti-aliasing, even when anti-aliasing is enabled. Use an odd number.

Most of this mentioned previously. 
This dark blue stroke 40 pix  / light blue stroke 41 pix  and you will get a better shape if you stroke with the paint tool.
That is a 4 pix grid showing, the selection has to follow pixel boundaries, gives that blocky shape. A path is sub-pixel and the density of the fill depends on the amount of the pixel 'captured'

Your graph is worth thousand words!
Your graph clearly show the difference between a path and a selection pixel wise.
Great explanation!