Grzegorz Borowiak ([EMAIL PROTECTED]) wrote:
> Thank You guys. It seems drawing a good thin non-antialiased line is so
> foar not implemented, I hope it will be. I could do it, but it would take
> a long time for me to understand code and the whole conception of GIMP. By
> now, I have the following idea to do it:
> As you see, it's universal, and would draw line with any tool, if this
> tool is correctly implemented to handle non-integer coordinates.
> 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).
Please note, that these problems are already solved in the Gimps Paintcore.
When you draw a line with the Paintbrush you will see that it is perfectly
antialiased and the "accumulating color" problem is solved too (you can
even disable this in the tool options).
In fact it is this generality that creates the problems with the Pencil...
> How do you all feel about it? Is it a good idea, or not? I think you will
> be more able to implement it and insert in proper place in GIMP's source.
> If would use a lot of time to analyze sources (in fact, I would have to
> learn how to use GIMP sources and thouroughly study it) and find this
> proper place, and although this I would however have doubts if this is
> correct place and if it does not conflict with GIMP's internal
> architecture, assumptions and whatever.
These deep gimp internals are quite powerful and compicated. I have not
yet a full clue what happens there, but it involves a lot of
Subsampling, filling an area with color/patterns/brush data, mask the
area with the brush mask and finally apply the result to the drawable,
respecting the current selection and the current paint mode.
And I guess that even this is simplified... :-)
> If you have a bit of time to do it, do it. If no, tell me, I will however
> try to do it for myself and I will send you results of my work, and I hope
> this will be useful for you and will not make incompatibility forks.
This certainly won't make it into the 1.2-versions of Gimp. However,
I think we should attack the problem in CVS-HEAD. But please be aware, that
there is *much* work to do until a first 1.3.0 release happens.
[EMAIL PROTECTED] http://www.home.unix-ag.org/simon/
Gimp-developer mailing list