[cairo] A diagram for criticism/comments

Behdad Esfahbod behdad at behdad.org
Wed Dec 12 14:36:30 PST 2007


On Wed, 2007-12-12 at 16:04 -0500, Donn wrote:
> Hi all,
>  I have spent some time getting my thoughts in order, and tried to sum-up my 
> overview of Cairo (so far) in a diagram. I have attached it. If anyone has 
> the time to comment that would be great.

Nice indeed!  I try to not repeat what others have pointed out already:

  - Instead of noun/verb, try calling them preparation/action.  Also add
some set_line_* stuff in preparation list.

  - Move the source and mask to look more like what your bubble does
now.  Something like the images in:

  http://cairographics.org/tutorial/

  - Instead of Surface "destination" just say destination Surface.
Someone else noted that the same thing has been referred to using three
names: surface, target, and destination.  That's not true, it's either
target, or destination surface.  Target is the destination surface!  But
I agree that cairo_get_target() would have been better named
cairo_get_destination() to go with cairo_[sg]et_source().  We can of
course improve docs still.

  - Your bubble concept and description suggests that clipping is
involved: "isolated islands".  That's not true unless you do
cairo_clip() too.  And what you describe sounds more like the
push/pop_group() than save/restore which really just operations on
cairo_t.

  - 'Source of "paint"' suggests that it's the source only for the
paint() operation.

  - You're missing the show_text/glyphs() in your verb.  Also, clip()
belongs to the nouns list really.  It's not a drawing operation.  Just
preparation.

  - Somewhere note that a Context is actually called cairo_t in C, not
cairo_context_t...  But if you're in Python, never mind.


> I intend to use this in a tutorial (from a python pov) which I am working on, 
> slowly :)

You should totally put it on cairographics.org at some point.

> Good night,
> \d

'night
-- 
behdad
http://behdad.org/

...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning.  -- Matt Welsh



More information about the cairo mailing list