[cairo] API Shakeup: cairo_current_matrix

Carl Worth cworth at cworth.org
Fri Apr 8 12:51:48 PDT 2005


On Wed, 06 Apr 2005 16:55:15 -0400, Carl Worth wrote:
> +cairo_matrix_t
> +cairo_get_matrix (cairo_t *cr);

After actually using the above function, I found it was a rather
clumsy fit with:

	void
	cairo_set_matrix (cairo_t *cr, cairo_matrix_t *matrix);

Since in the first case cairo_matrix_t is being returned directly as a
value, but in the second it is not. And it seems to me like it would
be a rather bad idea to have cairo_set_matrix accept a cairo_matrix_t
as a value.

So, instead, I've fixed this by putting cairo_get_matrix back like it
looked even before the cairo_matrix_t datatype was exposed:

	void
	cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix);

Which gives much better symmetry in use.

-Carl

PS. I'm still mulling over the 3x3 proposals.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050408/854fb67e/attachment.pgp


More information about the cairo mailing list