Skip to content
Newer
Older
100644 295 lines (209 sloc) 7.22 KB
dabe7e9 Merged from RVG
rmagick authored
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta name="generator" content=
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
7 "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
dabe7e9 Merged from RVG
rmagick authored
8
df65846 Replace version number placeholder "MAJOR.MINOR.TEENY" with "0.0.0"
rmagick authored
9 <title>RMagick 0.0.0: RVG Reference: Transforms</title>
dabe7e9 Merged from RVG
rmagick authored
10 <meta http-equiv="Content-Type" content=
11 "text/html; charset=us-ascii" />
12 <meta name="GENERATOR" content="Quanta Plus" />
13 <meta name="Copyright" content=
3829d21 Change copyright date to 2006
rmagick authored
14 "Copyright (C) 2006 by Timothy P. Hunter" />
dabe7e9 Merged from RVG
rmagick authored
15 <link rel="stylesheet" type="text/css" href="css/doc.css" />
16 <link rel="stylesheet" type="text/css" href="css/ref.css" />
17 <script type="text/javascript" src="scripts/doc.js">
18 </script>
19 <script type="text/javascript">
20 //<![CDATA[
21 //]]>
22 </script>
23 <style type="text/css">
24 /*<![CDATA[*/
25 }
26 /*]]>*/
27 </style>
28 </head>
29
30 <body>
df65846 Replace version number placeholder "MAJOR.MINOR.TEENY" with "0.0.0"
rmagick authored
31 <h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
dabe7e9 Merged from RVG
rmagick authored
32
33 <div class="nav">
34 &laquo;&nbsp;<a href="rvgshape.html">Prev</a> | <a href=
35 "index.html">Contents</a> | <a href=
36 "index.html">Next</a>&nbsp;&raquo;
37 </div>
38
36823a0 Tidying
rmagick authored
39 <h1>The transform methods</h1>
dabe7e9 Merged from RVG
rmagick authored
40
41 <div id="toc">
42 <h2>Table of Contents</h2>
43
44 <h3>About the transform methods</h3>
45
46 <h3>Transform methods</h3>
47
48 <ul>
49 <li><a href="#matrix">matrix</a></li>
50
51 <li><a href="#rotate">rotate</a></li>
52
53 <li><a href="#scale">scale</a></li>
54
55 <li><a href="#skewX">skewX</a></li>
56
57 <li><a href="#skewY">skewY</a></li>
58
59 <li><a href="#translate">translate</a></li>
60 </ul>
61 </div>
62
63 <div class="subhd">
64 <h2>About the transform methods</h2>
65 </div>
66
67 <div class="intro">
68 <p>The default coordinate system has its origin in the
69 upper-left corner. The positive x-axis extends to the right.
70 The positive y-axis extends downward. You can change this
71 coordinate system by using one or more of the transform methods
72 described on this page. This image shows the default coordinate
73 system.</p>
74
75 <p><a href=
76 "javascript:popup('InitialCoords.rb.html')"><img src="ex/InitialCoords.gif"
77 title="Click to see the example script" alt=
78 "initial coordinates example" /></a></p>
79
80 <p>This image shows a drawing without transformations.</p>
81
82 <p><a href="javascript:popup('OrigCoordSys.rb.html')"><img src=
83 "ex/OrigCoordSys.gif" title="Click to see the example script"
84 alt="a drawing without transformations" /></a></p>
85
86 <p>The transform methods are defined in the <a href=
87 "rvg.html">RVG</a>, <a href="rvggroup.html">RVG::Group</a>, and
88 <a href="rvguse.html">RVG::Use</a> classes. You can also chain
89 these methods to the <a href="rvgshape.html">shape methods</a>
90 and to the <a href="rvgimage.html">image</a> method.</p>
91 </div>
92
93 <div class="subhd">
94 <h2>Transform methods</h2>
95 </div>
96
97 <div class='sig'>
98 <h4 id='matrix'>matrix</h4>
99
100 <p><span class="arg">obj</span>.matrix(<span class=
101 "arg">sx</span>, <span class="arg">rx</span>, <span class=
102 "arg">ry</span>, <span class="arg">sy</span>, <span class=
103 "arg">tx</span>, <span class="arg">ty</span>) -&gt;
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
104 <em>obj</em></p>
dabe7e9 Merged from RVG
rmagick authored
105 </div>
106
107 <div class="desc">
108 <h5>Description</h5>
109
110 <p>Replaces the current transformation matrix with a new matrix
111 having the specified values. See the <a href=
112 "http://www.w3.org/TR/SVG11/coords.html#TransformAttribute">SVG
113 standard</a> for more information.</p>
114
115 <h5>Arguments</h5>
116
117 <dl>
118 <dt>sx, sy</dt>
119
120 <dd>The scale factor in the <em>x</em>-dimension and
121 <em>y</em>-dimension, measured in user coordinates.</dd>
122
123 <dt>rx, ry</dt>
124
125 <dd>The amount of rotation about the x-axis and y-axis,
126 measured in degrees.</dd>
127
128 <dt>tx, ty</dt>
129
130 <dd>The translation on the <em>x</em>-axis and the
131 <em>y</em>-axis, measured in user coordinates.</dd>
132 </dl>
133 </div>
134
135 <div class='sig'>
136 <h4 id='rotate'>rotate</h4>
137
138 <p><span class="arg">obj</span>.rotate(<span class=
139 "arg">angle</span>[, <span class="arg">cx</span>, <span class=
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
140 "arg">cy</span>]) -&gt; <em>obj</em></p>
dabe7e9 Merged from RVG
rmagick authored
141 </div>
142
143 <div class="desc">
144 <h5>Description</h5>
145
146 <p>Rotates the axes about the origin or, if <span class=
147 "arg">cx</span> and <span class="arg">cy</span> are present,
148 about the specified point.</p>
149
150 <h5>Arguments</h5>
151
152 <dl>
153 <dt>angle</dt>
154
155 <dd>The amount of rotation. Positive angles rotate clockwise,
156 negative angles rotate counter-clockwise.</dd>
157
158 <dt>cx, cy</dt>
159
160 <dd>If present, the point to rotate about.</dd>
161 </dl>
162
163 <h5>Example</h5>
164
165 <p>See <a href="#scale">scale</a>.</p>
166 </div>
167
168 <div class='sig'>
169 <h4 id='scale'>scale</h4>
170
171 <p><span class="arg">obj</span>.scale(<span class=
172 "arg">sx</span>[, <span class="arg">sy</span>]) -&gt;
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
173 <em>obj</em></p>
dabe7e9 Merged from RVG
rmagick authored
174 </div>
175
176 <div class="desc">
177 <h5>Description</h5>
178
179 <p>Scales the axes.</p>
180
181 <h5>Arguments</h5>
182
183 <dl>
184 <dt>sx</dt>
185
186 <dd>The amount of scaling on the <em>x</em>-axis.</dd>
187
188 <dt>sy</dt>
189
190 <dd>If present, the amount of scaling on the <em>y</em>-axis.
191 Otherwise defaults to <span class="arg">sx</span>.</dd>
192 </dl>
193
194 <h5>Example</h5>
195
196 <p><a href="javascript:popup('RotateScale.rb.html')"><img src=
197 "ex/RotateScale.gif" title="Click to see the example script"
198 alt="rotate and scale example" /></a></p>
199 </div>
200
201 <div class='sig'>
202 <h4 id='skewX'>skewX</h4>
203
204 <p><span class="arg">obj</span>.skewX(<span class=
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
205 "arg">angle</span>) -&gt; <em>obj</em></p>
dabe7e9 Merged from RVG
rmagick authored
206 </div>
207
208 <div class="desc">
209 <h5>Description</h5>
210
211 <p>Skews the <em>x</em>-axis.</p>
212
213 <h5>Arguments</h5>
214
215 <dl>
216 <dt>angle</dt>
217
218 <dd>The skew amount, measured in degrees.</dd>
219 </dl>
220
221 <h5>Example</h5>
222
223 <p>See <a href="#skewY">skewY</a></p>
224 </div>
225
226 <div class='sig'>
227 <h4 id='skewY'>skewY</h4>
228
229 <p><span class="arg">obj</span>.skewY(<span class=
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
230 "arg">angle</span>) -&gt; <em>obj</em></p>
dabe7e9 Merged from RVG
rmagick authored
231 </div>
232
233 <div class="desc">
234 <h5>Description</h5>
235
236 <p>Skews the <em>y</em>-axis.</p>
237
238 <h5>Arguments</h5>
239
240 <dl>
241 <dt>angle</dt>
242
243 <dd>The skew amount, measured in degrees.</dd>
244 </dl>
245
246 <h5>Example</h5>
247
248 <p><a href="javascript:popup('Skew.rb.html')"><img src=
249 "ex/Skew.gif" title="Click to see the example script" alt=
250 "skewX and skewY example" /></a></p>
251 </div>
252
253 <div class='sig'>
254 <h4 id='translate'>translate</h4>
255
256 <p><span class="arg">obj</span>.translate(<span class=
257 "arg">tx</span>[, <span class="arg">ty</span>]) -&gt;
b39952f Change "aClass" convention to just "class" in method signatures. Nume…
rmagick authored
258 <em>obj</em></p>
dabe7e9 Merged from RVG
rmagick authored
259 </div>
260
261 <div class="desc">
262 <h5>Description</h5>
263
264 <p>Moves the origin.</p>
265
266 <h5>Arguments</h5>
267
268 <dl>
269 <dt>tx</dt>
270
271 <dd>The location of the new origin on the x-axis.</dd>
272
273 <dt>ty</dt>
274
275 <dd>The location of the new origin on the y-axis. If omitted,
276 defaults to <span class="arg">tx</span>.</dd>
277 </dl>
278
279 <h5>Example</h5>
280
281 <p><a href="javascript:popup('NewCoordSys.rb.html')"><img src=
282 "ex/NewCoordSys.gif" title="Click to see the example script"
283 alt="translate example" /></a></p>
284 </div>
285
286 <p class="spacer">&nbsp;</p>
287
288 <div class="nav">
289 &laquo; <a href="rvgshape.html">Prev</a> | <a href=
290 "index.html">Contents</a> | <a href="index.html">Next</a>
291 &raquo;
292 </div>
293 </body>
294 </html>
Something went wrong with that request. Please try again.