<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I thank Martin (<a class="moz-txt-link-abbreviated" href="mailto:martinfischer8@t-online.de">martinfischer8@t-online.de</a>) for responding me and
fixed the problem in my first question.</p>
<p><br>
</p>
<p><font face="Lucida Sans Unicode">I have another problem for some
days still with Cairo when overlaying texts, i probably forgeth
something or do not understand some others tricks in CAIRO.<br>
</font></p>
<font face="Lucida Sans Unicode">In my program i've to display
several text strings on a png image.</font><br>
<br>
<font face="Lucida Sans Unicode">The first one for player1
(Scoreboard image)</font><br>
<br>
<font face="Lucida Sans Unicode">The second one for player 2 wich is
the same code.<br>
</font>
<p><br>
</p>
<p>It is as if the second text was creating a new full image and
deleting the first text.<br>
</p>
<br>
<font face="Lucida Sans Unicode">Cairo code start like this :</font><br>
<br>
<font face="Lucida Sans Unicode">// START CAIRO HEAD<br>
</font><br>
<font face="Lucida Sans Unicode">cairo_surface_t *surface;<br>
cairo_t *cr;<br>
<br>
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
600, 400);<br>
cr = cairo_create(surface);<br>
cairo_set_source_rgb(cr, 0.7, 0.3, 0.2);<br>
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);<br>
cairo_paint(cr);<br>
<br>
cairo_select_font_face(cr, "Sans",
CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL);<br>
cairo_set_font_size(cr, 20.0);<br>
cairo_set_source_rgb(cr, 1.0, 1.0, 0.1);</font><br>
<br>
<font face="Lucida Sans Unicode">// END CAIRO HEAD<br>
</font><br>
<br>
<font face="Lucida Sans Unicode">For some reasons i ignore,
displaying datas for player2 is ok,</font><br>
<br>
<font face="Lucida Sans Unicode">But the first pass in the program
for player 1 never works, Even if a "printf" is right displayed on
my screen.</font><br>
<br>
<font face="Lucida Sans Unicode">See this :</font><br>
<br>
<font face="Lucida Sans Unicode"> if(joueur->num == 1)<br>
{<br>
char * joueur1 = joueur[joueur->num-1].nom;<br>
printf("%s\t", joueur1); // joueur1 name is
displayed on screen<br>
cairo_move_to(cr, 10, 50); <br>
cairo_show_text(cr, joueur1); // <b>this is never
on the PNG image Cairo writes</b><br>
</font><font face="Lucida Sans Unicode">}</font><br>
<br>
<font face="Lucida Sans Unicode">later in the program i have for
player2 the same code :</font><br>
<br>
<font face="Lucida Sans Unicode"> if(joueur->num == 2)<br>
{<br>
char * joueur2 = joueur->nom;<br>
printf("%s\t", joueur2);<br>
cairo_move_to(cr, 10, 120);<br>
cairo_show_text(cr, joueur2); // <b>No problem,
text is in the PNG image</b><br>
</font><br>
<br>
<font face="Lucida Sans Unicode"> }</font><br>
<br>
// END CAIRO CODE<br>
cairo_surface_write_to_png(surface, "image.png");<br>
cairo_destroy(cr);<br>
cairo_surface_destroy(surface);
<div class="moz-signature"><br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Thanks in advance for your help.<br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>signature</title>
<br>
<div style="text-align: left;"><br>
</div>
</div>
</body>
</html>