[cairo] Overlay problem for two texts
Mohit Sindhwani
ml3p at onghu.com
Wed Jan 5 16:18:14 UTC 2022
On 2022-1-6 12:10 am, Eric Feillant wrote:
> 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 ....
>
Are you able to post the images? I think the group doesn't allow
pictures but you can try or upload some place and link it.
cairo_set_source_rgb(cr, 0.7, 0.3, 0.2);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint(cr);
In short, this code sets the colour to rgb(0.7, 0.3, 0.3) and then seems
to paint the whole surface in that colour. So, if you did:
- paint the whole surface in a colour
- draw the text for player 1
- paint the whole surface in a colour [again]
- draw the text for player 2
But if you have removed it and you're still not seeing both texts,
something else is going on.
Best Regards,
Mohit.
2022-1-6 | 12:16 am.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220106/29eb5869/attachment.htm>
More information about the cairo
mailing list