The seg fault is when I try to get the matrix - line 85 (line numbers at left)<br><br> 79 /**********************************<br> 80 * Nuclear Proteins <br> 81 **********************************/<br>
82 cairo_set_font_size (cr, (1400.0*nuclear)/total);<br> 83 cairo_set_source_rgb (cr, 0.4, 0.2, 0.6);<br> 84 cairo_move_to (cr, BORDER+CELL_DIAM/2-3600*nuclear/total, TOP_BORDER+1000*nuclear /total);<br>
85 cairo_get_font_matrix(cr,fatrix);<br> 86 cairo_matrix_init_scale(fatrix,0.8,1);<br> 87 cairo_set_font_matrix(cr,fatrix);<br> 88 cairo_show_text (cr, "N");<br> 89 cairo_set_font_size (cr, (1040.0*nuclear)/total);<br>
90 cairo_show_text (cr, "ucLea");/**/<br> 91 cairo_set_font_size (cr, (1400.0*nuclear)/total);<br> 92 cairo_show_text (cr, "R");/**/<br> 93 <br>in_cell is 0.70<br><br>Program received signal SIGSEGV, Segmentation fault.<br>
0x00000032e8c0f914 in ?? () from /usr/lib64/libcairo.so.2<br>(gdb) backtrace<br>#0 0x00000032e8c0f914 in ?? () from /usr/lib64/libcairo.so.2<br>#1 0x000000000040161a in cellgram (nuclear=2, cytosolic=2, <br> membrane=3, extracellular=3) at cellgram.c:85<br>
#2 0x0000000000400e99 in main (argc=5, argv=0x7fffffffe778)<br> at stub.c:18<br>(gdb) <br><br><br><br><br><br><div class="gmail_quote">On Wed, Jul 28, 2010 at 12:22 AM, Kayven Riese <span dir="ltr"><<a href="mailto:kayvey@gmail.com">kayvey@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">But if I restore the context, have I done anything? It seems if I restore the context I will lose the changes I am trying to make. <br>
<br><div class="gmail_quote"><div class="im">On Wed, Jul 28, 2010 at 12:16 AM, donn <span dir="ltr"><<a href="mailto:donn.ingle@gmail.com" target="_blank">donn.ingle@gmail.com</a>></span> wrote:<br>
</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>On 28/07/2010 08:56, Kayven Riese wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I need to learn to make my letters on a different<br>
canvas and combine the two canvases or something, don't I?<br>
</blockquote></div>
Have a look at context.save() and context.restore() -- you can have a different matrix within those two and not affect the one outside.<br><font color="#888888">
<br>
<br>
\d</font><div><div></div><div><br>
<br>
--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</div></div></blockquote></div></div></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br><br>*----------------------------------------------------------*<br> Kayven Riese, BSCS, <br> MS (Physiology and Biophysics)<br>
(415) 902 5513 cellular<br>
<a href="http://kayve.net" target="_blank">http://kayve.net</a><br> Webmaster <a href="http://ChessYoga.org" target="_blank">http://ChessYoga.org</a><br>*----------------------------------------------------------*<br>
<br><br><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><br>*----------------------------------------------------------*<br> Kayven Riese, BSCS, <br> MS (Physiology and Biophysics)<br> (415) 902 5513 cellular<br>
<a href="http://kayve.net">http://kayve.net</a><br> Webmaster <a href="http://ChessYoga.org">http://ChessYoga.org</a><br>*----------------------------------------------------------*<br><br><br><br>