[cairo] Want to stretch my fonts

Kayven Riese kayvey at gmail.com
Wed Jul 28 00:25:11 PDT 2010


The seg fault is when I try to get the matrix   - line 85 (line numbers at
left)

 79         /**********************************
 80          * Nuclear Proteins
 81          **********************************/
 82         cairo_set_font_size (cr, (1400.0*nuclear)/total);
 83         cairo_set_source_rgb (cr, 0.4, 0.2, 0.6);
 84         cairo_move_to (cr, BORDER+CELL_DIAM/2-3600*nuclear/total,
TOP_BORDER+1000*nuclear    /total);
 85         cairo_get_font_matrix(cr,fatrix);
 86         cairo_matrix_init_scale(fatrix,0.8,1);
 87         cairo_set_font_matrix(cr,fatrix);
 88         cairo_show_text (cr, "N");
 89         cairo_set_font_size (cr, (1040.0*nuclear)/total);
 90         cairo_show_text (cr, "ucLea");/**/
 91         cairo_set_font_size (cr, (1400.0*nuclear)/total);
 92         cairo_show_text (cr, "R");/**/
 93
in_cell is   0.70

Program received signal SIGSEGV, Segmentation fault.
0x00000032e8c0f914 in ?? () from /usr/lib64/libcairo.so.2
(gdb) backtrace
#0  0x00000032e8c0f914 in ?? () from /usr/lib64/libcairo.so.2
#1  0x000000000040161a in cellgram (nuclear=2, cytosolic=2,
    membrane=3, extracellular=3) at cellgram.c:85
#2  0x0000000000400e99 in main (argc=5, argv=0x7fffffffe778)
    at stub.c:18
(gdb)





On Wed, Jul 28, 2010 at 12:22 AM, Kayven Riese <kayvey at gmail.com> wrote:

> 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.
>
> On Wed, Jul 28, 2010 at 12:16 AM, donn <donn.ingle at gmail.com> wrote:
>
>> On 28/07/2010 08:56, Kayven Riese wrote:
>>
>>> I need to learn to make my letters on a different
>>> canvas and combine the two canvases or something, don't I?
>>>
>> Have a look at context.save() and context.restore() -- you can have a
>> different matrix within those two and not affect the one outside.
>>
>>
>> \d
>>
>>
>> --
>> cairo mailing list
>> cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo
>>
>
>
>
> --
>
> *----------------------------------------------------------*
>   Kayven Riese, BSCS,
>                       MS  (Physiology and Biophysics)
>   (415) 902 5513 cellular
>   http://kayve.net
>   Webmaster http://ChessYoga.org
> *----------------------------------------------------------*
>
>
>
>


-- 

*----------------------------------------------------------*
  Kayven Riese, BSCS,
                      MS  (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*----------------------------------------------------------*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100728/69fd1d4b/attachment-0001.htm>


More information about the cairo mailing list