[cairo] A diagram for criticism/comments

Peter Groves pdgroves at gmail.com
Wed Dec 12 13:40:37 PST 2007


On Wed, 12 Dec 2007 23:04:33 +0200
Donn <donn.ingle at gmail.com> 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.

It looks good. As I just started with cairo, here are my first thoughts with respect
to what tripped me up:

1) Context: I would explicitly say "This is what you use to *draw* on a surface," rather
than just "...you use to *draw* with." Early on it wasn't clear to me that a context is only a controller and is not also the surface itself. Many tutorials and examples just show a
context which is drawn on and then you're done, with other details hidden. This makes 
things simpler but also leads to some ambiguity.

2) Surface/Destination. This is also called "target" in the api. It seems to be called "target" in the api and "destination" in all the docs, which I found a little confusing to have three terms for the same thing. You can't do anything about that here, obviously, but you could spell it out how they're related.

3) I'm not the biggest fan of the noun/verb metaphor. I know it's quite prevalent. The problem is that "move_to" is a verb, not a noun. And really many of the "nouns" are tracing *actions* starting at the current pen location. For them to be nouns, they would all need
to be declarations like "line with endpoints (x1,y1) and (x2, y2)". It's more like 
sketching in pencil and then "inking" a drawing. Or maybe "tracing"
and then "inking". I realize it's not that helpful for me to point this out without a good
substitute, but I thought I'd mention it.

Peter
-- 
http://petergroves.com


More information about the cairo mailing list