Explaining the Scratch Off algorithm of the Hatching brush
pentalis at gmail.com
Sat Jun 19 18:22:14 CEST 2010
> > Now, with respect to "boring, very regular" hatching, the current
> > (described in the GUI as trigonometry-algebra) has the problem that lines
> > thicken in incremental mode (opaque background off) and look jagged in
> > (opaque background on). Part of the jagging comes from the fact that the
> > tips in the borders of the lines look different than the inner parts, so
> > cutting those borders would help; that would have the extra benefit of
> > reducing thickening in incremental mode. But even so, the lines get
> > inherently out of sync when drawn little-chunk by little-chunk instead of
> > all at a time; I am sure that it is due to the rasterization step,
> > I did the algebra carefully, and floating-point calculations aren't THAT
> > imprecise to cause such errors to arise (or are they?).
> You might revisit the rasterization code. Maybe try to write some debug
> and see how is our rasterization code behaving and fix the problem, if you
> able. I spent some time on rasterization when I was working on GSoC 2008,
> there were problems with lines so I left the code as it was.
I'll try to read that and see if I can do something.
I'm a bit intimidated by touching the existing codebase, as I think I may
I'm also very slow reading code, as I need to familiarize with many things I
don't know, though I'm getting faster.
> > I believe the "no jagging and less thickening" benefit is remarkable, it
> > would make the hatching generated look almost as clean if it were made by
> > filter, but it would be generated in real time and directly on the canvas
> > by the user, instead of requiring the user to mount an elaborate set of
> > layers and apply filters on it to get his final result (besides, the
> > GIMP's Newsprint filter isn't too versatile with the hatching, so it
> > take the user many iterations and therefore a great deal of time to
> > achieve areas with different thickness or with crosshatching, using that
> > filter).
> > Endnote: with respect to Incremental and Wash: the dialogue the UI offers
> > for choosing between incremental and wash mode has different effects than
> > what I envisioned as the "opaque background" option, that's why I want
> > to coexist. When I link the BrushTip dialogue I'll make a proof of
> Would you document all those options you have in your paintop in the wiki?
> E.g. I did preliminary docs for spray  long time ago (older then
> it's not up-to-date, but you have inspiration.
>  http://wiki.koffice.org/index.php?title=Paintops/Spray_brush
> No problem, I will.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kimageshop