Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disparities between stroke selection and stroke path
#1
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]
Reply
#2
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.


Reply
#3
(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.
Reply
#4
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

   

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

   

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

   

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

   
Reply
#5
(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. 
Reply
#6
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'


Attached Files Thumbnail(s)
   
Reply
#7
(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.
Reply
#8
(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!
Reply


Forum Jump: