[cairo] Overlay problem for two texts
Eric Feillant
eric.feillant at live-media.fr
Wed Jan 5 16:10:28 UTC 2022
Hi Mohit,
Thank you for your response.
Yes, the code run in a loop for all players. I've tried without :
cairo_set_source_rgb(cr, 0.7, 0.3, 0.2);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint(cr);
But without success, only player 2 is present in the image ... really i
don't understand
because the two player are displayed on screen with the printf function ....
Mistake .....
Eric
Yes, Le 05/01/2022 à 16:45, Mohit Sindhwani a écrit :
> 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.
>
--
signature
Live Media - Solutions de Streaming <https://Live-Media.fr>
Découvrez nos solutions de Streaming *LM2S
<https://live-media.fr/lm2s.html>* destinées aux organisations sportives
ainsi que nos solutions de streaming embarquées pour *caméras AXIS
<https://live-media.fr/axis.html>*
Live Media - Solutions de Streaming
Contact at Live-Media.fr
LIVE MEDIA - http://Live-Media.fr
Solutions de Streaming
0636072198
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220105/fc196ba8/attachment-0001.htm>
More information about the cairo
mailing list