Sven Neumann ([EMAIL PROTECTED]) 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?

Gimp-developer mailing list

Reply via email to