Re: [Gimp-developer] Thin lines using pencil

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sven Neumann (sven@xxxxxxxx) wrote:
> Instead of drawing brush pixmaps onto the canvas at
> equidistant spots along the line as the paintbrush does, the pencil
> tool could use a real line-drawing algorithm (Bresenham). This would
> imply that our brushes couldn't be used with the pencil tool any 
> longer since this algorithm would only work for rounded or square 
> pencil tips (or am I wrong here?).

I think you are wrong there  :-)

You could calculate the intermediate points with Bresenham and then
place the brushes on these points only (or a subset, according to the
spacing). So the Pencil would place the brushes always at integer
positions which results in perfect lines for 1-pixel brushes and
usable lines with ornamental brushes.

So if we have a 10-pixel wide brush with a spacing of 50 you could
place it on every fifth pixel of the bresenham-calculated coordinates.

Does this sound good?

Bye,
        Simon
-- 
      Simon.Budig@xxxxxxxxxxx       http://www.home.unix-ag.org/simon/


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux