[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gerbv-1.0.3 released!



On Fri, 2007-11-30 at 08:58 -0500, Stuart Brorson wrote:
> Peter --
> 
> > I found some low-hanging fruit..
> [......]
> 
> > My time is limited, but eventually I can work this up into a useful
> > patch.
> 
> Great!  Thank you for your comments.  Once you get a patch put
> together, please forward it to me and stick it on the SF patch
> tracker, and I will apply it post haste!

(Ps.. clipping on pixel aligned bounds speeds things up nicely, add 0.5
to the coord origins.)

Here is another teaser..
http://www2.eng.cam.ac.uk/~pcjc2/geda/gerbv_translucent.png

Unfortunately, the multiple compositing operations make it slow. (I need
to do some profiling).

The operations are as follows. (NB. I didn't use the push_group code
which was commented out in gerbv, as it seemed to be slower still).

Expose event..

* Don't bother setting clip region, we're making a new surface the right size,
  hence automatic clipping.
* Make "similar" surface to the context GDK gave us, but with Alpha channel.
  This is the right size for the expose event.
* For each layer by layer:
  * Clear the similar surface, to opaque black if this is the first layer,
    otherwise translucent. The translucency here depends on how much you want
    this layer to darken previous layers where it doesn't have drawing. I 
    special  cased the layer number corresponding to silk in the above
    example to transparent background. The others are 0.5 black.
  * Draw on the similar surface, all objects are drawn opaque, in their real color
  * Composite this onto the gdk provided surface

I'm not familiar enough with cairo internals to figure out if we use
masks (no colour at this stage) rendered from our geometry to give
faster rendering.

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user