<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hi Eric,<br>
<br>
Someone else might be able to help you more but just to get you
started.<br>
<br>
On 2022-1-5 7:48 pm, Eric Feillant wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3c0c9532-62eb-08a0-d343-436c9c9ab2d4@live-media.fr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<font face="Lucida Sans Unicode">My problem here is that in the
"for" loop, cairo display only one colum and not the entire
string, ex: 3 2 1</font><br>
<font face="Lucida Sans Unicode">my small code:</font><br>
<font face="Lucida Sans Unicode"> char sets2 [100]
;<br>
for (size_t i=0; i < match->nb_set; i++)<br>
{<br>
char chaine = joueur->sets[i] ;<br>
sprintf(sets2 , "%d", chaine);<br>
printf("%s ", sets2); // This print 3 2 1 <br>
cairo_move_to(cr, 250, 120);<br>
cairo_show_text(cr, sets2); // this display in
the image one colum the overlayed number<br>
}</font><br>
</blockquote>
<br>
<font face="Lucida Sans Unicode">As I see it, you move to the exact
same position on the surface (250,120) and then you draw the text,
one character at a time - this means that you will end up with all
the characters drawn at the same position on top of each other.<br>
<br>
There are text samples here:
<a class="moz-txt-link-freetext" href="https://www.cairographics.org/samples/text/">https://www.cairographics.org/samples/text/</a><br>
You will see that, in general, you want to output the whole string
once you move to the position rather than just a single character.<br>
<br>
Hope this helps.<br>
<br>
Best Regards,<br>
Mohit.<br>
2022-1-5 | 11:23 pm.<br>
<br>
</font>
</body>
</html>