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