Re: [Gimp-developer] Thin lines using pencil

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

 



Sven Neumann wrote:
> 
> Hi,
> 
> Grzegorz Borowiak <grzes@xxxxxxxxxxxxxxx> writes:
> 
> > There could be problem if brush size is big and line has to be
> > half-transparent. E.g. brush radius is 10 and intensity is 0.5. There
> > would be 1-pixel-close overlapping brush hits, whose intensities would
> > accumulate. But this problem can easily be compensated if we use more
> > sophiscated tool_t function, which would reasonably decrease its intensity
> > (simply dividing nominal intensity by radius size and then by sine/cosine
> > value of line angle) for all pixels except two ends, and these two ends
> > would be painted with full nominal intensity, but only half of brush would
> > be painted (this half which does not overlap with any mid-line brush hit).
> 
> I don't think this would work well. Instead I'd suggest to draw the
> brush totally opaque to intermediate tiles, then blend these with the
> choosen brush opacity onto the drawable. Might be more memory-intensive
> but should give perfect results. On the other hand it would diverge a
> lot from what happens if you draw a line by hand. Would it make sense
> to consider a line-drawing tool? I think it would be especially useful
> to stroke selections and paths. Our current approaches to stamp the
> brush at equidistant positions along the outline does not give pleasant
> results and all attempts to improve this will most probably only mess up
> the (already weird) code.

I agree. 

> Such a line-drawing tool wouldn't work with brushes but would have
> configurable line-width and cap settings. I might be wrong, but I think
> the ink tool might be suited reasonably good for proper line drawing.
> If it would have support for drawing straight lines using the Shift
> key, we could test it and this should be easy to implement.
> 

For single pixel lines I think we should really go with a bresenham
type solution.

The antialiasing on the ink tools looks visually a little off to me.
not how easy it would be to fix that.

I have a design in mind for an AA bresenham line drawing function that
supports wide lines with end caps, mitred corners and customizable tip
profile shapes but I doubt I'll ever have time to code it up.


Jay Cox
jaycox@xxxxxxxx


[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