* Kelly Martin <[EMAIL PROTECTED]> [040326 21:12]:
> Manish Singh wrote:
> >We could simply bypass the pdb for painting, and just emit "record this"
> >on button release. But maybe it'd be better to have the pdb more involved,
> >I dunno.
> You'd at least have to serialize all the events for the paintbrush and 
> airbrush if you want the macro to be brush- and color- independent (that 
> is, you are interested in capturing the motions used, rather than the 
> result).  You could save the serialization in a buffer and then spew it 
> forth at the end, but I don't see any way around collecting the actual 
> paint events.

Ideally you want to implement this code in an resolution independent
manner as well. Thus all motion events should be interpolated in some
manner,. when zoomed out drawing freehand shapes are guaranteed to
create coordinate quantification in the shape, unless the coordinates
are interpolated, and ideally translated to a curve.

If a procedual GEGL operation is lying below,. you could just pass the
controlpoints of the curve to the function,. at some level the
bezier/spline curve could perhaps also be smoothed within a threshold,
when using tools freehand, before passing it to the drawing op itself,.
doing it in this manner allows parametric data to be cached for a more
advanced and memory efficient undo op stack as well.

> This was a requirement when I was asked to this by my former employer back 
> in 2000, and also a requirement for the guy who was trying to contract 
> Wilberworks to do it back in 1998.  I think a macro recorder that doesn't 
> capture motion events will be of limited utility to users.
  /V\    Øyvind Kolås,  Gjøvik University College, Norway 
  ^ ^    
Gimp-developer mailing list

Reply via email to