[cairo] win32 text antialiasing

Emmanuel Pacaud emmanuel.pacaud at lapp.in2p3.fr
Sat Jan 10 02:14:12 PST 2009


Le samedi 10 janvier 2009 à 01:48 +0300, Kozhevnikov Mikhail a écrit :
> I've tried turning on antialiasing with the following code:
>    cairo_font_options_t opt;
>    cairo_get_font_options(_cr, &opt);
>    cairo_font_options_set_antialias(&opt, CAIRO_ANTIALIAS_GRAY);
>    cairo_set_font_options(_cr, &opt);
> 
> but received an error as _cairo_font_options underlying cairo_font_options_t is not defined.

The content of cairo_font_options_t structure is not public. You can
only create one using cairo_font_options_create.

So your code should be:

cairo_font_options_t *opt;

opt = cairo_font_options_create ();
cairo_get_font_options (_cr, opt);
cairo_font_options_set_antialias (opt, CAIRO_ANTIALIAS_GRAY);
cairo_set_font_options (_cr, opt);
cairo_font_options_destroy (opt);

	Emmanuel.

-- 
Emmanuel PACAUD
Groupe Virgo
LAPP - Laboratoire d'Annecy-le-Vieux de physique des particules
9, chemin de Bellevue - BP 110
74941 Annecy-le-Vieux CEDEX
France
Tél: (+33)4 50 09 55 92 ou 17 89 - Fax: (+33)4 50 27 94 95



More information about the cairo mailing list