[cairo] trouble with Cairo text in OpenGL
spitzak at gmail.com
Wed Jan 4 12:47:42 PST 2012
Does he need to do cairo_flush(cr) before using the pixels?
Victor henri wrote:
> surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 64, 64);
> cr = cairo_create (surface);
> cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT_NORMAL,
> cairo_set_font_size (cr, 32.0);
> cairo_set_source_rgb (cr, 1.0, 1.0, 0.0);
> cairo_show_text (cr, "HELLO");
You did not set the current point before drawing the text, so I think it
drew it at 0,0 and you are just seeing the descenders of some letters.
You may also need to do cairo_surface_flush(surface) before grabbing the
More information about the cairo