[cairo] [cairo-announce] cairo snapshot 1.3.2 now available

Steve Chaplin stevech1097 at yahoo.com.au
Sun Jan 7 18:52:31 PST 2007

On Wed, 2006-11-15 at 15:28 -0800, Carl Worth wrote:
> API additions
> -------------
> Several new API additions are available in this release. There is a
> common theme among all the additions in that they allow cairo to
> advertise information about its state that it was refusing to
> volunteer earlier. So this isn't groundbreaking new functionality, but
> it is essential for easily achieving several tasks.
> The new functions can be divided into three categories:
> 	Getting information about the current clip region
> 	-------------------------------------------------
> 	cairo_clip_extents
> 	cairo_copy_clip_rectangles
> 	cairo_rectangle_list_destroy
> 	Getting information about the current dash setting
> 	--------------------------------------------------
> 	cairo_get_dash_count
> 	cairo_get_dash
> 	Getting information from a pattern
> 	----------------------------------
> 	cairo_pattern_get_rgba
> 	cairo_pattern_get_surface
> 	cairo_pattern_get_color_stop_rgba
> 	cairo_pattern_get_color_stop_count
> 	cairo_pattern_get_linear_points
> 	cairo_pattern_get_radial_circles
> In each of these areas, we have new API for providing a list of
> uniform values from cairo. The closest thing we had to this before was
> cairo_copy_path, (which is rather unique in providing a list of
> non-uniform data).
> The copy_clip_rectangles/rectangle_list_destroy functions follow a
> style similar to that of cairo_copy_path. Meanwhile, the dash and
> pattern color stop functions introduce a new style in which there is a
> single call to return the number of elements available (get_dash_count
> and get_color_stop_count) and then a function to be called once to get
> each element (get_dash and get_color_stop_rgba).
> I'm interested in hearing feedback from users of these new API
> functions, particularly from people writing language bindings. One
> open question is whether the clip "getter" functionality should adopt
> a style similar to that of the new dash and color_stop interfaces.

Are you saying that the new dash and color_stop interfaces are similar
and that the new clip "getter" is different? I can't see that.

I've started to implement the new API for the Python bindings.

In Python notation
  returns a list of dashes and an offset == [1.0, 2.0, 3.0, 4.0], offset

  returns a list of rectangles == [(x,y,w,h), (x,y,w,h), ...]

  returns a list of path elements == [(type, points), (type,
points), ...]

  returns one item from a list   list[i] == (o,r,g,b,a)
                           where list    == [(o,r,g,b,a),
(o,r,g,b,a), ...]

It looks like cairo_pattern_get_color_stop_rgba() is the odd one out -
it returns an item from a list whereas the others return lists.
Why not simply return the whole list?


Send instant messages to your online friends http://au.messenger.yahoo.com 

More information about the cairo mailing list