[cairo] A diagram for criticism/comments

Vladimir Vukicevic vladimir at pobox.com
Wed Dec 12 16:03:57 PST 2007


On Dec 12, 2007, at 1:50 PM, Dirk Schönberger wrote:

>> - listing "move_to" "line_to" etc. under "Nouns" is kind of odd,  
>> since
>> they are verbs themselves; you may as well include a Path in there  
>> and
>> have paths be the Nouns, and "move_to" etc. be "Path Verbs".
>
> While I like the theory of path and path verbs, I don't think this  
> is quite
> correct. For me it would imply that there woul exist some verb which  
> can be
> applied to the none, namely a cairo_draw_path(path). This is not  
> possible
> with the current API.

It is -- cairo_copy_path and cairo_append_path.  stroke/fill operate  
on the current implicit path, as does clip() (though, as Behdad says,  
clip is different)

basically:

move_to/line_to/path_glyphs/etc -> path

path -> {stroke, fill, clip}
pattern -> mask
glyph array -> show_glyphs

> Somehow arc also belongs to the (path) verbs, because it really  
> creates a
> path segment out of a arc.

right, arc() is also a path verb, along with rectangle() and the  
rest.  Not sure what you mean by 'creates a path segment out of an  
arc' -- it creates a path segment that is an arc, represented as a  
curve.

>> - The "Source" is always a pattern, and "rgba_colour", "surface", and
>> "gradient" are pattern types.  I wouldn't mention png images at all  
>> --
>> they really are not relevant to cairo, and the png methods are in
>> cairo just for convenience for testing.
>
> I hope you are wrong here.;) There can exist surfaces which work on  
> the
> vector data, not on some cached image.
> This happens if you use e.g. a PDF or PS surface as source.

Sure, I never said cached image, I just said "surface".  A PDF/PS  
surface is used a surface pattern source, like the others.

     - Vlad



More information about the cairo mailing list