smooth painting (was: Re: Filters "dialog" in 2.0)
Cyrille Berger
cberger at cberger.net
Wed Jun 20 22:53:19 CEST 2007
On Wednesday 20 June 2007, Boudewijn Rempt wrote:
> > All brush strokes were cubic bezier splines. This also meant one could
> > change a stroke hours after it had been placed and it could be rendered
> > at any resolution. I'd rip code from Inscape. Their path reconstruction
> > while freehand drawing is one of the best I've seen and that include
> > commercial packages.
>
> That would be something for Cyrille to look at; I know he's been working on
> that kind of code for our freehand tool this very week.
Yes and the problem I have met to get a better result is that currently the
stroke is rendered on the final canvas without the possibility to know the
full path. So a few possibility are available :
- delay the drawing until the next point is available and hope the user won't
notice (and paint with a null tangent when the cursor don't move for more
than a second)
- keep the bezier curve (using for instance Emanuele's last year google soc),
but the main problem is then performance when rendering the curve ( maybe
some optimization can be done by just rerendering part of the curve thought)
- the worse is to try to guess the next move of the user (which is what we do
currently :) ) but that's still give good enought results
--
Cyrille Berger
More information about the kimageshop
mailing list