On Sat, 6 May 2000, Tuomas Kuosmanen <[EMAIL PROTECTED]> wrote:
> On Thu, May 04, 2000 at 06:29:19PM +0200, Raphael Quinet wanted to say the following:
> 
> > If Edit->Stroke does not give good results with a 1-pixel brush, you
> > can try the following: first, fill your selection with the foreground
> > color, then make a selection that is 1 pixel smaller than the previous
> > one and use Edit->Clear.  That will leave a thin 1-pixel line.
> 
> If Edit->Stroke does not give good results with a 1-pixel brush, you can try
> the following: first, fill your selection with the foreground color, then
> use Select -> Shrink (1 pixel) and use Edit->Clear.  That will leave a thin
> 1-pixel line. Note that this works best if you are working on a separate
> layer.

Aha...  I see that even our Gimp master does not know some of the
minor problems of his beloved tool...  :-)

I wrote "make a selection that is 1 pixel smaller" instead of "use
Select->Shrink" because shrinking the selection does not work well in
this case.  If you are trying to make a perfect 1-pixel-thick circle
(with anti-aliasing), you really have to make a second selection
instead of trying to shrink the existing one.  The differences between
shrinking the selection and making a new one are not very big, but
they are visible.

I did several experiments in order to find the best way to create a
perfect 1-pixel circle.  That's how I eventually came up with this
tip.  I encourage you to do the same if you want to understand the
problems:
- Create a new image (256x256).
- Choose the 1-pixel brush.
- In one corner of the image, select a 100x100 circle, switch to the
  Pen and use Edit-Stroke: you get a 1-pixel circle, but without
  anti-aliasing.  The average thickness is fine, though.
- In another corner, do the same with Edit->Stroke but use the Brush
  instead of the Pen: you get a 2-pixels circle (much too thick), and
  the anti-aliasing is not even good.
- In a third corner, select a 100x100 circle, fill it with black,
  then select a 98x98 circle with the same center and clear it: you
  get a 1-pixel circle that looks perfect.
- In the fourth corner, select a 100x100 circle, fill it with black,
  use Select->Shrink and then clear: you get something that is a bit
  thicker than the previous one (like 1.4 pixels), especially in the
  areas that have a tangent at +/- 45 degrees.  The parts of the
  circle that are almost vertical or horizontal seem to be a bit
  thinner than the other parts of the circle.

If you compare the results, you will see that the method involving two
selections gives the best results.  It would be nice if there was an
easier way to do that with the Gimp, but I haven't found any...

Note that the Select->Shrink method works well for rectangles and it
may be the best choice if you have a very complex selection that is
not easy to redo.

> (or something more clever for the last sentence to point out that
> edit->clear is destructive)

I agree about that.  I'll try to modify the tip.

-Raphael

Reply via email to