KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/share/gtk-doc/html/cairo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/share/gtk-doc/html/cairo/cairo-Transformations.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Transformations</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="Drawing.html" title="Drawing">
<link rel="prev" href="cairo-Patterns.html" title="Patterns">
<link rel="next" href="cairo-Text.html" title="Text">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;Tutorial">
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;Reference">
<link rel="chapter" href="Drawing.html" title="Drawing">
<link rel="chapter" href="Fonts.html" title="Fonts">
<link rel="chapter" href="Surfaces.html" title="Surfaces">
<link rel="chapter" href="Support.html" title="Utilities">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of new symbols in 1.2">
<link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="cairo-Patterns.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="Drawing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
<td><a accesskey="n" href="cairo-Text.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2547030" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2532835" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="cairo-Transformations"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2547030"></a><span class="refentrytitle">Transformations</span>
</h2>
<p>Transformations &#8212; Manipulating the current transformation matrix</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



void        <a href="cairo-Transformations.html#cairo-translate">cairo_translate</a>                 (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double tx,
                                             double ty);
void        <a href="cairo-Transformations.html#cairo-scale">cairo_scale</a>                     (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double sx,
                                             double sy);
void        <a href="cairo-Transformations.html#cairo-rotate">cairo_rotate</a>                    (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double angle);
void        <a href="cairo-Transformations.html#cairo-transform">cairo_transform</a>                 (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
void        <a href="cairo-Transformations.html#cairo-set-matrix">cairo_set_matrix</a>                (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
void        <a href="cairo-Transformations.html#cairo-get-matrix">cairo_get_matrix</a>                (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
void        <a href="cairo-Transformations.html#cairo-identity-matrix">cairo_identity_matrix</a>           (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
void        <a href="cairo-Transformations.html#cairo-user-to-device">cairo_user_to_device</a>            (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *x,
                                             double *y);
void        <a href="cairo-Transformations.html#cairo-user-to-device-distance">cairo_user_to_device_distance</a>   (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *dx,
                                             double *dy);
void        <a href="cairo-Transformations.html#cairo-device-to-user">cairo_device_to_user</a>            (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *x,
                                             double *y);
void        <a href="cairo-Transformations.html#cairo-device-to-user-distance">cairo_device_to_user_distance</a>   (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *dx,
                                             double *dy);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2532835"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2532851"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2532862"></a><h3>
<a name="cairo-translate"></a>cairo_translate ()</h3>
<a class="indexterm" name="id2532874"></a><pre class="programlisting">void        cairo_translate                 (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double tx,
                                             double ty);</pre>
<p>
Modifies the current transformation matrix (CTM) by translating the
user-space origin by (<em class="parameter"><code>tx</code></em>, <em class="parameter"><code>ty</code></em>). This offset is interpreted as a
user-space coordinate according to the CTM in place before the new
call to cairo_translate. In other words, the translation of the
user-space origin takes place after any existing transformation.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>tx</code></em>&#160;:</span></td>
<td> amount to translate in the X direction
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ty</code></em>&#160;:</span></td>
<td> amount to translate in the Y direction
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2575529"></a><h3>
<a name="cairo-scale"></a>cairo_scale ()</h3>
<a class="indexterm" name="id2575541"></a><pre class="programlisting">void        cairo_scale                     (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double sx,
                                             double sy);</pre>
<p>
Modifies the current transformation matrix (CTM) by scaling the X
and Y user-space axes by <em class="parameter"><code>sx</code></em> and <em class="parameter"><code>sy</code></em> respectively. The scaling of
the axes takes place after any existing transformation of user
space.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
<td> scale factor for the X dimension
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
<td> scale factor for the Y dimension
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2575646"></a><h3>
<a name="cairo-rotate"></a>cairo_rotate ()</h3>
<a class="indexterm" name="id2575658"></a><pre class="programlisting">void        cairo_rotate                    (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double angle);</pre>
<p>
Modifies the current transformation matrix (CTM) by rotating the
user-space axes by <em class="parameter"><code>angle</code></em> radians. The rotation of the axes takes
places after any existing transformation of user space. The
rotation direction for positive angles is from the positive X axis
toward the positive Y axis.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>angle</code></em>&#160;:</span></td>
<td> angle (in radians) by which the user-space axes will be
rotated
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2574418"></a><h3>
<a name="cairo-transform"></a>cairo_transform ()</h3>
<a class="indexterm" name="id2574430"></a><pre class="programlisting">void        cairo_transform                 (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
<p>
Modifies the current transformation matrix (CTM) by applying
<em class="parameter"><code>matrix</code></em> as an additional transformation. The new transformation of
user space takes place after any existing transformation.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></td>
<td> a transformation to be applied to the user-space axes
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2574511"></a><h3>
<a name="cairo-set-matrix"></a>cairo_set_matrix ()</h3>
<a class="indexterm" name="id2574523"></a><pre class="programlisting">void        cairo_set_matrix                (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
<p>
Modifies the current transformation matrix (CTM) by setting it
equal to <em class="parameter"><code>matrix</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></td>
<td> a transformation matrix from user space to device space
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2574602"></a><h3>
<a name="cairo-get-matrix"></a>cairo_get_matrix ()</h3>
<a class="indexterm" name="id2574614"></a><pre class="programlisting">void        cairo_get_matrix                (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
<p>
Stores the current transformation matrix (CTM) into <em class="parameter"><code>matrix</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></td>
<td> return value for the matrix
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2527705"></a><h3>
<a name="cairo-identity-matrix"></a>cairo_identity_matrix ()</h3>
<a class="indexterm" name="id2527716"></a><pre class="programlisting">void        cairo_identity_matrix           (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
<p>
Resets the current transformation matrix (CTM) by setting it equal
to the identity matrix. That is, the user-space and device-space
axes will be aligned and one user-space unit will transform to one
device-space unit.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2527769"></a><h3>
<a name="cairo-user-to-device"></a>cairo_user_to_device ()</h3>
<a class="indexterm" name="id2527780"></a><pre class="programlisting">void        cairo_user_to_device            (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *x,
                                             double *y);</pre>
<p>
Transform a coordinate from user space to device space by
multiplying the given point by the current transformation matrix
(CTM).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> X value of coordinate (in/out parameter)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> Y value of coordinate (in/out parameter)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2527874"></a><h3>
<a name="cairo-user-to-device-distance"></a>cairo_user_to_device_distance ()</h3>
<a class="indexterm" name="id2527886"></a><pre class="programlisting">void        cairo_user_to_device_distance   (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *dx,
                                             double *dy);</pre>
<p>
Transform a distance vector from user space to device space. This
function is similar to <a href="cairo-Transformations.html#cairo-user-to-device"><code class="function">cairo_user_to_device()</code></a> except that the
translation components of the CTM will be ignored when transforming
(<em class="parameter"><code>dx</code></em>,<em class="parameter"><code>dy</code></em>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dx</code></em>&#160;:</span></td>
<td> X component of a distance vector (in/out parameter)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dy</code></em>&#160;:</span></td>
<td> Y component of a distance vector (in/out parameter)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2528002"></a><h3>
<a name="cairo-device-to-user"></a>cairo_device_to_user ()</h3>
<a class="indexterm" name="id2528013"></a><pre class="programlisting">void        cairo_device_to_user            (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *x,
                                             double *y);</pre>
<p>
Transform a coordinate from device space to user space by
multiplying the given point by the inverse of the current
transformation matrix (CTM).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> X value of coordinate (in/out parameter)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> Y value of coordinate (in/out parameter)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2528108"></a><h3>
<a name="cairo-device-to-user-distance"></a>cairo_device_to_user_distance ()</h3>
<a class="indexterm" name="id2528119"></a><pre class="programlisting">void        cairo_device_to_user_distance   (<a href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
                                             double *dx,
                                             double *dy);</pre>
<p>
Transform a distance vector from device space to user space. This
function is similar to <a href="cairo-Transformations.html#cairo-device-to-user"><code class="function">cairo_device_to_user()</code></a> except that the
translation components of the inverse CTM will be ignored when
transforming (<em class="parameter"><code>dx</code></em>,<em class="parameter"><code>dy</code></em>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a cairo context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dx</code></em>&#160;:</span></td>
<td> X component of a distance vector (in/out parameter)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dy</code></em>&#160;:</span></td>
<td> Y component of a distance vector (in/out parameter)
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>

Anon7 - 2021