[cairo] cairo_get_dash_count and other cairo getters

Steve Chaplin stevech1097 at yahoo.com.au
Wed Dec 27 03:17:38 PST 2006

What's the cairo API policy for getter functions?

Most simply return the 'get object'
  cairo_antialias_t cairo_get_antialias (cairo_t *cr)

Some write to a pointer argument and return void
  void cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix)
  void cairo_get_font_matrix (cairo_t *cr, cairo_matrix_t *matrix)
  void cairo_get_font_options (cairo_t *cr, cairo_font_options_t
  void cairo_get_current_point (cairo_t *cr, double *x, double *y)

Some write to a pointer argument and return cairo_status
  cairo_status_t cairo_get_dash_count (cairo_t *cr, int *count)
  cairo_status_t cairo_get_dash (cairo_t *cr, double *dashes, double

It looks like 3 different ways to do the same thing. (I know
cairo_get_current_point and cairo_get_dash are special cases returning 2
values). Shouldn't it be
  int cairo_get_dash_count (cairo_t *cr)
  void cairo_get_dash (cairo_t *cr, double *dashes, double *offset)
so the new function prototypes are consistent with the other cairo_get_


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

More information about the cairo mailing list