[cairo] A diagram for criticism/comments

Gerdus van Zyl gerdusvanzyl at gmail.com
Fri Dec 14 02:00:05 PST 2007


Hmm, I always think of the cairo drawing model as layers that can't be
changed after they are created. ( I am a big Photoshop user,
everything a layer )

* in the beginning there was the layer
* decide where the layer stops ( clipping )
* rotate and scale the layer
* put a shape onto the layer (path/rectangle/move_to)
* then you decide what texture you want the shape ( set_source/set_source_rgb )
[ the texture can be anything - color, another layer, random noise, image, etc]
* (optional) decide how the texture will affect the shape ( mask )
* color in the shape with the selected texture ( fill/paint )
* specify a texture for the outline
* outline the shape
* the layer is discarded with the result now on the Surface
* the clipping and transforms remains in force for future layers

The context is the palette it is how you draw/manipulate the document (surface)
Groups are a layer you save to use later.

That's how it works in my head anyway... It's not technically correct of course.

May I suggest you break the diagram up into 3 diagrams:
architecture/flow, constructing a path and transforms (
clipping,rotation,masking )

~g


More information about the cairo mailing list