[cairo] Overlay problem for two texts

Mohit Sindhwani ml3p at onghu.com
Wed Jan 5 15:45:22 UTC 2022


Hi Eric,


On 2022-1-5 9:51 pm, Eric Feillant wrote:
> Cairo code start like this :
>
> // START CAIRO HEAD
>
> cairo_surface_t *surface;
>         cairo_t *cr;
>
>         surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 600, 
> 400);
>         cr = cairo_create(surface);
>         cairo_set_source_rgb(cr, 0.7, 0.3, 0.2);
>         cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
>         cairo_paint(cr);
>
>         cairo_select_font_face(cr, "Sans", 
> CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL);
>         cairo_set_font_size(cr, 20.0);
>         cairo_set_source_rgb(cr, 1.0, 1.0, 0.1);
>
> // END CAIRO HEAD

Does the code run in a loop for all players? Or does the Cairo head run 
for each of the players? If it runs for all players, then, it's possible 
that this code is overwriting the older drawing, maybe...

         cairo_set_source_rgb(cr, 0.7, 0.3, 0.2);
         cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
         cairo_paint(cr);

Best regards,
Mohit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220105/23273c3e/attachment.htm>


More information about the cairo mailing list