[cairo] Cryptic clips

Donn donn.ingle at gmail.com
Fri Nov 30 09:10:09 PST 2007


Hi,
 I'm trying to clip a number of "shapes" beneath a primary "shape". My 
approach so far is this pseudo code:

1 matrix [set translate, rotate and scale]
2 draw clip shape
3 save()
4 clip()
5   matrix [set translate, rotate and scale]
6   draw shape 1
7   matrix [set translate, rotate and scale]
8   draw shape 2
9 restore()

So, the idea is that shape 1 gets a transformation, shape 2 gets another and 
they both are clipped by  'clip shape' (2).

The thing I can't figure out is how to *not* extend the transformation 
of 'clip shape' (line 1) *over* the two sub-shapes. 
 For example, if 'clip shape' is scaled up twice, I don't want shape1 or 
shape2 to scale along with it. 

I tried inserting indentity_matrix() after line 4, but that just disappears 
both shapes.

Forgive me if I'm being dense. Lead has nothing on me :)

\d


More information about the cairo mailing list