<br><br><div class="gmail_quote">On Tue, Jul 27, 2010 at 11:58 PM, Behdad Esfahbod <span dir="ltr">&lt;<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>&gt;</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 02:56, Kayven Riese wrote:<br>
&gt; but that takes only cr as an argument.. so it is going to scale my<br>
&gt; entire canvas right?  I need to learn to make my letters on a different<br>
&gt; canvas and combine the two canvases or something, don&#39;t I?<br>
<br>
</div>Check out cairo_set_font_matrix().<br></blockquote><div><br> <a href="http://cairographics.org/manual/cairo-text.html#cairo-set-font-matrix">http://cairographics.org/manual/cairo-text.html#cairo-set-font-matrix</a><br>
<br>OK.. umm.. so I use what Andrea said to change this matrix? umm.. I suspect I need to use a function that is going to create a font matrix that is to my liking.. umm.. I probably need to get the existing font matrix some how.. first I use the function right below to get the matrix.. so <br>
<br> I already created my personal variable &quot;fatrix&quot; <br><br> 18         cairo_matrix_t * fatrix;<br><br>That&#39;s in the file I originally attached.. so now I am going to use the get and set functions.. but in between, don&#39;t I have to rescale my matrix some how?<br>
<br>so This function<br><br><a href="http://cairographics.org/manual/cairo-matrix.html#cairo-matrix-t">http://cairographics.org/manual/cairo-matrix.html#cairo-matrix-t</a><br><br><h3>cairo_matrix_init_scale ()</h3>
<pre class="programlisting">void                cairo_matrix_init_scale             (<a class="link" href="http://cairographics.org/manual/cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *matrix,<br>
                                                         double sx,<br>                                                         double sy);</pre>
<p>
Initializes <em class="parameter"><code>matrix</code></em> to a transformation that scales by <em class="parameter"><code>sx</code></em> and <em class="parameter"><code>sy</code></em>
in the X and Y dimensions, respectively.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td> a <a class="link" href="http://cairographics.org/manual/cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sx</code></em> :</span></p></td>
<td> scale factor in the X direction
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sy</code></em> :</span></p></td>
<td> scale factor in the Y direction<br><br><br>in betweem get and set?<br></td></tr></tbody></table></div><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
behdad<br>
<div class="im"><br>
<br>
&gt; On Tue, Jul 27, 2010 at 11:50 PM, Kayven Riese &lt;<a href="mailto:kayvey@gmail.com">kayvey@gmail.com</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:kayvey@gmail.com">kayvey@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     but that takes only cr as an argument.. so it is going to scale my<br>
&gt;     entire canvas right?  I need to learn to make my letters on a<br>
&gt;     different canvas and combine the two canvases or something, don&#39;t I?<br>
&gt;<br>
&gt;<br>
&gt;     On Tue, Jul 27, 2010 at 11:42 PM, Andrea Canciani &lt;<a href="mailto:ranma42@gmail.com">ranma42@gmail.com</a><br>
</div><div class="im">&gt;     &lt;mailto:<a href="mailto:ranma42@gmail.com">ranma42@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;         On Wed, Jul 28, 2010 at 8:09 AM, Kayven Riese &lt;<a href="mailto:kayvey@gmail.com">kayvey@gmail.com</a><br>
</div><div><div></div><div class="h5">&gt;         &lt;mailto:<a href="mailto:kayvey@gmail.com">kayvey@gmail.com</a>&gt;&gt; wrote:<br>
&gt;         &gt; Hi, I have attached four files (oops five--see below) so that<br>
&gt;         if somebody<br>
&gt;         &gt; has a UNIX command line hopefully you just save them and do<br>
&gt;         &quot;make stub&quot; and<br>
&gt;         &gt; you can run my code. For compatibility here is my CentOS uname:<br>
&gt;         &gt; [root@localhost ~]# uname -a<br>
&gt;         &gt; Linux localhost 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48<br>
&gt;         EDT 2010 x86_64<br>
&gt;         &gt; x86_64 x86_64 GNU/Linux<br>
&gt;         &gt; [root@localhost ~]#<br>
&gt;         &gt;<br>
&gt;         &gt; My goal is to create a &quot;cellgam.png&quot; but to have more control<br>
&gt;         over the<br>
&gt;         &gt; font.  I want to stretch it vertically.  In the example, I<br>
&gt;         think I ran the<br>
&gt;         &gt; program with the command<br>
&gt;         &gt;<br>
&gt;         &gt; ./stub 2 2 3 3<br>
&gt;         &gt;<br>
&gt;         &gt; which means that 20% of the proteins are nuclear.  I want the<br>
&gt;         word &quot;Nuclear&quot;<br>
&gt;         &gt; to have an extent that represents 20% of the vertical height<br>
&gt;         of the diagram,<br>
&gt;         &gt; but I want it to still be contained in my &quot;cell&quot; the rounded<br>
&gt;         rectangle I<br>
&gt;         &gt; have drawn.  The rectangle is intended to have a vertical<br>
&gt;         extent propotional<br>
&gt;         &gt; to the first three arguments.<br>
&gt;         &gt;<br>
&gt;         &gt; All that is a ball of wax I can handle.  The only thing I am<br>
&gt;         asking is how<br>
&gt;         &gt; do I control what is happening to my text to transform it<br>
&gt;         vertically within<br>
&gt;         &gt; a box that I chose.  I got the idea for what I am doing from<br>
&gt;         the fifth file<br>
&gt;         &gt; I just attached, &quot;bp_font.jpeg&quot;  I want to be able to stretch<br>
&gt;         the word<br>
&gt;         &gt; &quot;Nuclear&quot; so it is taller, but control the width to be<br>
&gt;         narrower to still fit<br>
&gt;         &gt; inside my cell.<br>
&gt;         You can&#39;t do that just by changing the font size. You should use<br>
&gt;         cairo_scale with<br>
&gt;         appropriate arguments (see<br>
&gt;         <a href="http://cairographics.org/manual/cairo-transformations.html" target="_blank">http://cairographics.org/manual/cairo-transformations.html</a> )<br>
&gt;         Hope this helps<br>
&gt;         Andrea<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     --<br>
&gt;<br>
&gt;     *----------------------------------------------------------*<br>
&gt;       Kayven Riese, BSCS,<br>
&gt;                           MS  (Physiology and Biophysics)<br>
&gt;       (415) 902 5513 cellular<br>
&gt;       <a href="http://kayve.net" target="_blank">http://kayve.net</a><br>
&gt;       Webmaster <a href="http://ChessYoga.org" target="_blank">http://ChessYoga.org</a><br>
&gt;     *----------------------------------------------------------*<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; *----------------------------------------------------------*<br>
&gt;   Kayven Riese, BSCS,<br>
&gt;                       MS  (Physiology and Biophysics)<br>
&gt;   (415) 902 5513 cellular<br>
&gt;   <a href="http://kayve.net" target="_blank">http://kayve.net</a><br>
&gt;   Webmaster <a href="http://ChessYoga.org" target="_blank">http://ChessYoga.org</a><br>
&gt; *----------------------------------------------------------*<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; --<br>
&gt; cairo mailing list<br>
&gt; <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
&gt; <a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</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>