[cairo] [PATCH] PS/PDF improve efficiency of text output

Mathieu Lacage Mathieu.Lacage at sophia.inria.fr
Mon Sep 25 00:32:59 PDT 2006

On Sun, 2006-09-24 at 21:21 -0700, Vladimir Vukicevic wrote:

> There can potentially be a ton of these options; I'd suggest a generic
> cairo_surface_set_float_param or _set_int_param or _set_string_param
> (or some better way of representing this)... I know Carl isn't a big
> fan of such generic functions, but I think that this is more
> preferable to having an explosion of API methods, whether in the
> global namespace or in the surface namespace.

What you are proposing is an explosion of parameter types. It would
merely move the checking of whether or not a parameter is allowed for a
given surface type to runtime checks rather than compile-time checks. If
I had to choose, compile-time checks always win.


More information about the cairo mailing list