OK.. but now I am confused about how this is supposed to work.<br><br> 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>
<br>The attached pngs are cellgram.png with line 86 commented out.. and the other file with the cairo_matrix_init_scale active.. I am seeing a translation instead of a vertical shear .. or.. umm.. I wanted to squish the word so it would fit in the cell. I just wanted to do some numerical experiments (hence just plugged in 0.8 and 1).. what am I missing?<br>
<br><br><div class="gmail_quote">On Wed, Jul 28, 2010 at 12:27 AM, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad.esfahbod@gmail.com">behdad.esfahbod@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;">
<div class="im">On 07/28/10 03:20, Kayven Riese wrote:<br>
> Is that why I am getting a seg fault?<br>
<br>
</div>No. The reason is that you defined fatrix as a pointer. A pointer pointing<br>
nowhere. Instead you should define it as a cairo_matrix_t, then in your code,<br>
replace all "fatrix" occurrences with "&fatrix", and also use<br>
cairo_matrix_scale(&fatrix,0.8,1) instead of that cairo_matrix_init_scale()<br>
line of yours.<br>
<br>
behdad<br>
<div class="im"><br>
> /**********************************<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,<br>
> TOP_BORDER+1000*nuclear /total);<br>
> 85 cairo_get_font_matrix(cr,fatrix);<br>
> 86 cairo_matrix_init_scale(fatrix,0.8,0);<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>
><br>
> Do the scale factors multiply or add? I am supply sy = 0.. maybe I want<br>
> sy = 1<br>
><br>
><br>
> On Wed, Jul 28, 2010 at 12:16 AM, donn <<a href="mailto:donn.ingle@gmail.com">donn.ingle@gmail.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:donn.ingle@gmail.com">donn.ingle@gmail.com</a>>> wrote:<br>
><br>
> On 28/07/2010 08:56, Kayven Riese wrote:<br>
><br>
> I need to learn to make my letters on a different<br>
> canvas and combine the two canvases or something, don't I?<br>
><br>
> Have a look at context.save() and context.restore() -- you can have<br>
> a different matrix within those two and not affect the one outside.<br>
><br>
><br>
> \d<br>
><br>
><br>
> --<br>
> cairo mailing list<br>
</div>> <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a> <mailto:<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a>><br>
<div><div></div><div class="h5">> <a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
><br>
><br>
><br>
><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>
><br>
><br>
> --<br>
> cairo mailing list<br>
> <a href="mailto:cairo@cairographics.org">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><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>