Re: trouble with Cairo text in OpenGL

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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_FONT_WEIGHT_BOLD);
>         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 
image?
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.