rmagick 1.7.4 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

Files changed (130) hide show
  1. data/ChangeLog +10 -2
  2. data/README.html +284 -290
  3. data/README.txt +298 -307
  4. data/configure +180 -11
  5. data/configure.ac +18 -2
  6. data/doc/comtasks.html +1 -1
  7. data/doc/constants.html +15 -10
  8. data/doc/css/ref.css +67 -0
  9. data/doc/draw.html +1 -1
  10. data/doc/ex/InitialCoords.rb +24 -0
  11. data/doc/ex/NewCoordSys.rb +33 -0
  12. data/doc/ex/OrigCoordSys.rb +19 -0
  13. data/doc/ex/PreserveAspectRatio.rb +206 -0
  14. data/doc/ex/RotateScale.rb +38 -0
  15. data/doc/ex/Skew.rb +39 -0
  16. data/doc/ex/Use01.rb +17 -0
  17. data/doc/ex/Use02.rb +22 -0
  18. data/doc/ex/Use03.rb +17 -0
  19. data/doc/ex/ViewBox.rb +34 -0
  20. data/doc/ex/arcs01.rb +29 -0
  21. data/doc/ex/arcs02.rb +62 -0
  22. data/doc/ex/baseline_shift01.rb +19 -0
  23. data/doc/ex/bounding_box.rb +31 -37
  24. data/doc/ex/circle01.rb +18 -0
  25. data/doc/ex/cubic01.rb +46 -0
  26. data/doc/ex/cubic02.rb +95 -0
  27. data/doc/ex/drop_shadow.rb +1 -1
  28. data/doc/ex/ellipse01.rb +23 -0
  29. data/doc/ex/evenodd.rb +44 -0
  30. data/doc/ex/font_styles.rb +29 -0
  31. data/doc/ex/group.rb +27 -0
  32. data/doc/ex/image.rb +47 -0
  33. data/doc/ex/images/big-duck.gif +0 -0
  34. data/doc/ex/images/duck.gif +0 -0
  35. data/doc/ex/images/duck0.gif +0 -0
  36. data/doc/ex/images/duck1.gif +0 -0
  37. data/doc/ex/images/duck10.gif +0 -0
  38. data/doc/ex/images/duck11.gif +0 -0
  39. data/doc/ex/images/duck12.gif +0 -0
  40. data/doc/ex/images/duck13.gif +0 -0
  41. data/doc/ex/images/duck14.gif +0 -0
  42. data/doc/ex/images/duck15.gif +0 -0
  43. data/doc/ex/images/duck2.gif +0 -0
  44. data/doc/ex/images/duck3.gif +0 -0
  45. data/doc/ex/images/duck4.gif +0 -0
  46. data/doc/ex/images/duck5.gif +0 -0
  47. data/doc/ex/images/duck6.gif +0 -0
  48. data/doc/ex/images/duck7.gif +0 -0
  49. data/doc/ex/images/duck8.gif +0 -0
  50. data/doc/ex/images/duck9.gif +0 -0
  51. data/doc/ex/line01.rb +24 -0
  52. data/doc/ex/nested_rvg.rb +22 -0
  53. data/doc/ex/nonzero.rb +44 -0
  54. data/doc/ex/polygon01.rb +24 -0
  55. data/doc/ex/polyline01.rb +24 -0
  56. data/doc/ex/quad01.rb +37 -0
  57. data/doc/ex/rect01.rb +16 -0
  58. data/doc/ex/rect02.rb +23 -0
  59. data/doc/ex/rvg_clippath.rb +15 -0
  60. data/doc/ex/rvg_linecap.rb +44 -0
  61. data/doc/ex/rvg_linejoin.rb +42 -0
  62. data/doc/ex/rvg_opacity.rb +20 -0
  63. data/doc/ex/rvg_pattern.rb +27 -0
  64. data/doc/ex/rvg_stroke_dasharray.rb +13 -0
  65. data/doc/ex/sepiatone.rb +15 -0
  66. data/doc/ex/shadow.rb +37 -0
  67. data/doc/ex/smile.rb +9 -9
  68. data/doc/ex/stroke_fill.rb +12 -0
  69. data/doc/ex/text01.rb +18 -0
  70. data/doc/ex/text_styles.rb +22 -0
  71. data/doc/ex/texture_fill_to_border.rb +3 -3
  72. data/doc/ex/texture_floodfill.rb +3 -2
  73. data/doc/ex/tref01.rb +26 -0
  74. data/doc/ex/triangle01.rb +17 -0
  75. data/doc/ex/tspan01.rb +19 -0
  76. data/doc/ex/tspan02.rb +20 -0
  77. data/doc/ex/tspan03.rb +22 -0
  78. data/doc/ex/writing_mode01.rb +28 -0
  79. data/doc/ex/writing_mode02.rb +27 -0
  80. data/doc/ilist.html +1 -1
  81. data/doc/image1.html +66 -30
  82. data/doc/image2.html +1 -1
  83. data/doc/image3.html +274 -49
  84. data/doc/imageattrs.html +87 -10
  85. data/doc/imusage.html +1 -1
  86. data/doc/index.html +80 -39
  87. data/doc/info.html +149 -13
  88. data/doc/magick.html +1 -1
  89. data/doc/rvg.html +890 -0
  90. data/doc/rvgclip.html +249 -0
  91. data/doc/rvggroup.html +305 -0
  92. data/doc/rvgimage.html +288 -0
  93. data/doc/rvgpattern.html +456 -0
  94. data/doc/rvgshape.html +376 -0
  95. data/doc/rvgstyle.html +269 -0
  96. data/doc/rvgtext.html +464 -0
  97. data/doc/rvgtspan.html +237 -0
  98. data/doc/rvgtut.html +512 -0
  99. data/doc/rvguse.html +145 -0
  100. data/doc/rvgxform.html +294 -0
  101. data/doc/struct.html +9 -71
  102. data/doc/usage.html +22 -7
  103. data/ext/RMagick/MANIFEST +94 -2
  104. data/ext/RMagick/rmagick.h +10 -4
  105. data/ext/RMagick/rmagick_config.h.in +8 -2
  106. data/ext/RMagick/rmdraw.c +2 -2
  107. data/ext/RMagick/rmfill.c +2 -2
  108. data/ext/RMagick/rmilist.c +3 -3
  109. data/ext/RMagick/rmimage.c +152 -5
  110. data/ext/RMagick/rminfo.c +208 -2
  111. data/ext/RMagick/rmmain.c +14 -5
  112. data/ext/RMagick/rmutil.c +83 -22
  113. data/lib/RMagick.rb +2 -2
  114. data/lib/rvg/clippath.rb +46 -0
  115. data/lib/rvg/container.rb +129 -0
  116. data/lib/rvg/deep_equal.rb +54 -0
  117. data/lib/rvg/describable.rb +51 -0
  118. data/lib/rvg/embellishable.rb +395 -0
  119. data/lib/rvg/misc.rb +729 -0
  120. data/lib/rvg/paint.rb +48 -0
  121. data/lib/rvg/pathdata.rb +129 -0
  122. data/lib/rvg/rvg.rb +279 -0
  123. data/lib/rvg/stretchable.rb +150 -0
  124. data/lib/rvg/stylable.rb +116 -0
  125. data/lib/rvg/text.rb +185 -0
  126. data/lib/rvg/transformable.rb +131 -0
  127. data/lib/rvg/units.rb +64 -0
  128. data/rmagick.gemspec +1 -1
  129. data/uninstall.rb +3 -2
  130. metadata +96 -3
@@ -0,0 +1,376 @@
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=
7
+ "HTML Tidy for Linux/x86 (vers 1st March 2005), see www.w3.org" />
8
+
9
+ <title>RMagick: RVG Reference: Shapes</title>
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=
14
+ "Copyright (C) 2005 by Timothy P. Hunter" />
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>
31
+ <h6 id="header">RMagick User's Guide and Reference</h6>
32
+
33
+ <div class="nav">
34
+ &laquo;&nbsp;<a href="rvgstyle.html">Prev</a> | <a href=
35
+ "index.html">Contents</a> | <a href=
36
+ "rvgxform.html">Next</a>&nbsp;&raquo;
37
+ </div>
38
+
39
+ <h1>The shape methods</h1>
40
+
41
+ <div id="toc">
42
+ <h2>Table of Contents</h2>
43
+
44
+ <h3>About the shape methods</h3>
45
+
46
+ <h3>Shape methods</h3>
47
+
48
+ <div class="toccol">
49
+ <ul>
50
+ <li><a href="#circle">circle</a></li>
51
+
52
+ <li><a href="#ellipse">ellipse</a></li>
53
+
54
+ <li><a href="#line">line</a></li>
55
+
56
+ <li><a href="#path">path</a></li>
57
+
58
+ <li><a href="#polygon">polygon</a></li>
59
+
60
+ <li><a href="#polyline">polyline</a></li>
61
+
62
+ <li><a href="#rect">rect</a></li>
63
+ </ul>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="subhd">
68
+ <h2>About the shape methods</h2>
69
+ </div>
70
+
71
+ <div class="intro">
72
+ <p>The shape methods listed below are defined in the <a href=
73
+ "rvg.html">RVG</a>, <a href="rvgclip.html">RVG::ClipPath</a>,
74
+ <a href="rvggroup.html">RVG::Group</a>, and <a href=
75
+ "rvgpattern.html">RVG::Pattern</a> classes. You can chain the
76
+ <a href="rvgstyle.html">styles</a> method and the <a href=
77
+ "rvgxform.html">transform methods</a> to the shape methods.</p>
78
+ </div>
79
+
80
+ <div class="subhd">
81
+ <h2>shape</h2>
82
+ </div>
83
+
84
+ <div class="sig">
85
+ <h4 id='circle'>circle</h4>
86
+
87
+ <p><span class="arg">obj</span>.circle(<span class=
88
+ "arg">radius</span>, <span class="arg">cx</span>=0,
89
+ <span class="arg">cy</span>=0) -&gt; <span class=
90
+ "arg">aCircle</span></p>
91
+ </div>
92
+
93
+ <div class='desc'>
94
+ <h5>Description</h5>
95
+
96
+ <p>Adds a circle to the target object. The arc of a circle
97
+ begins at the "3 o'clock" point on the radius and progresses
98
+ towards the "9 o'clock" point. The starting point and direction
99
+ of the arc are affected by the user space transform in the same
100
+ manner as the geometry of the object.</p>
101
+
102
+ <h5>Arguments</h5>
103
+
104
+ <dl>
105
+ <dt>radius</dt>
106
+
107
+ <dd>The radius of the circle</dd>
108
+
109
+ <dt>cx, cy</dt>
110
+
111
+ <dd>The center of the circle</dd>
112
+ </dl>
113
+
114
+ <h5>Example</h5>
115
+
116
+ <p><a href="javascript:popup('circle01.rb.html')"><img src=
117
+ "ex/circle01.gif" title="Click to see the example script" alt=
118
+ "circle example" /></a></p>
119
+ </div>
120
+
121
+ <div class="sig">
122
+ <h4 id='ellipse'>ellipse</h4>
123
+
124
+ <p><span class="arg">obj</span>.ellipse(<span class=
125
+ "arg">rx</span>, <span class="arg">ry</span>, <span class=
126
+ "arg">cx</span>=0, <span class="arg">cy</span>=0) -&gt;
127
+ <span class="arg">anEllipse</span></p>
128
+ </div>
129
+
130
+ <div class='desc'>
131
+ <h5>Description</h5>
132
+
133
+ <p>Adds an ellipse to the target object. The arc of an ellipse
134
+ begins at the "3 o'clock" point on the radius and progresses
135
+ towards the "9 o'clock" point. The starting point and direction
136
+ of the arc are affected by the user space transform in the same
137
+ manner as the geometry of the object.</p>
138
+
139
+ <h5>Arguments</h5>
140
+
141
+ <dl>
142
+ <dt>rx, ry</dt>
143
+
144
+ <dd>The <em>x</em>- and <em>y</em>-radii of the ellipse</dd>
145
+
146
+ <dt>cx, cy</dt>
147
+
148
+ <dd>The center of the ellipse</dd>
149
+ </dl>
150
+
151
+ <h5>Example</h5>
152
+
153
+ <p><a href="javascript:popup('ellipse01.rb.html')"><img src=
154
+ "ex/ellipse01.gif" title="Click to see the example script" alt=
155
+ "ellipse example" /></a></p>
156
+ </div>
157
+
158
+ <div class="sig">
159
+ <h4 id='line'>line</h4>
160
+
161
+ <p><span class="arg">obj</span>.line(<span class=
162
+ "arg">x1</span>=0, y1=0, <span class="arg">x2</span>=0,
163
+ <span class="arg">y2</span>=0) -&gt; <span class=
164
+ "arg">aLine</span></p>
165
+ </div>
166
+
167
+ <div class='desc'>
168
+ <h5>Description</h5>
169
+
170
+ <p>Adds a line to the target object. Lines are never
171
+ filled.</p>
172
+
173
+ <h5>Arguments</h5>
174
+
175
+ <dl>
176
+ <dt>x1, y1</dt>
177
+
178
+ <dd>The starting point of the line</dd>
179
+
180
+ <dt>x2, y2</dt>
181
+
182
+ <dd>The ending point of the line</dd>
183
+ </dl>
184
+
185
+ <h5>Example</h5>
186
+
187
+ <p><a href="javascript:popup('line01.rb.html')"><img src=
188
+ "ex/line01.gif" title="Click to see the example script" alt=
189
+ "line example" /></a></p>
190
+ </div>
191
+
192
+ <div class="sig">
193
+ <h4 id='path'>path</h4>
194
+
195
+ <p><span class="arg">obj</span>.path(<span class=
196
+ "arg">path_data</span>) -&gt; <span class=
197
+ "arg">aPath</span></p>
198
+ </div>
199
+
200
+ <div class="desc">
201
+ <h5>Description</h5>
202
+
203
+ <p>Adds a path to the target object.</p>
204
+
205
+ <h5>Arguments</h5>
206
+
207
+ <p>A path string. The path string has the same syntax as the
208
+ <strong>d=</strong> attribute on SVG's path element. See the
209
+ <a href="http://www.w3.org/TR/SVG11/paths.html">SVG
210
+ standard</a> for a complete description of the syntax.</p>
211
+
212
+ <h5>Examples</h5>
213
+
214
+ <p>moveto, lineto, and closepath commands<a href=
215
+ "javascript:popup('triangle01.rb.html')"><img src=
216
+ "ex/triangle01.gif" title="Click to see the example script"
217
+ alt="triangle example" /></a></p>
218
+
219
+ <p>simple uses of cubic B&eacute;zier commands within a
220
+ path<a href="javascript:popup('cubic01.rb.html')"><img src=
221
+ "ex/cubic01.gif" title="Click to see the example script" alt=
222
+ "cubic Bezier commands example" /></a></p>
223
+
224
+ <p>cubic B&eacute;zier commands change their shape according to
225
+ the position of the control points<a href=
226
+ "javascript:popup('cubic02.rb.html')"><img src="ex/cubic02.gif"
227
+ title="Click to see the example script" alt=
228
+ "cubic Bezier commands example" /></a></p>
229
+
230
+ <p>simple uses of quadratic B&eacute;zier commands within a
231
+ path <a href="javascript:popup('quad01.rb.html')"><img src=
232
+ "ex/quad01.gif" title="Click to see the example script" alt=
233
+ "quadratic Bezier commands example" /></a></p>
234
+
235
+ <p>simple uses of arc commands within a path<a href=
236
+ "javascript:popup('arcs01.rb.html')"><img src="ex/arcs01.gif"
237
+ title="Click to see the example script" alt=
238
+ "arc commands example" /></a></p>
239
+
240
+ <p>Elliptical arcs: The following illustrates the four
241
+ combinations of large-arc-flag and sweep-flag and the four
242
+ different arcs that will be drawn based on the values of these
243
+ flags. <a href="javascript:popup('arcs02.rb.html')"><img src=
244
+ "ex/arcs02.gif" title="Click to see the example script" alt=
245
+ "elliptical arc example" /></a></p>
246
+ </div>
247
+
248
+ <div class="sig">
249
+ <h4 id='polygon'>polygon</h4>
250
+
251
+ <p><span class="arg">obj</span>.polygon(<span class=
252
+ "arg">x1</span>, y1, <span class="arg">x2</span>, <span class=
253
+ "arg">y2</span>...) -&gt; <span class="arg">aPolygon</span></p>
254
+ </div>
255
+
256
+ <div class="desc">
257
+ <h5>Description</h5>
258
+
259
+ <p>Adds a closed shape consisting of a series of connected line
260
+ segments to the target object.</p>
261
+
262
+ <h5>Arguments</h5>
263
+
264
+ <p>A list of points that make up the polygon. It is an error to
265
+ define an odd number of points.</p>
266
+
267
+ <h5>Example</h5>
268
+
269
+ <p><a href="javascript:popup('polygon01.rb.html')"><img src=
270
+ "ex/polygon01.gif" title="Click to see the example script" alt=
271
+ "polygon example" /></a></p>
272
+ </div>
273
+
274
+ <div class="sig">
275
+ <h4 id='polyline'>polyline</h4>
276
+
277
+ <p><span class="arg">obj</span>.polyline(<span class=
278
+ "arg">x1</span>, y1, <span class="arg">x2</span>, <span class=
279
+ "arg">y2</span>...) -&gt; <span class=
280
+ "arg">apolyline</span></p>
281
+ </div>
282
+
283
+ <div class="desc">
284
+ <h5>Description</h5>
285
+
286
+ <p>Adds a set of connected lines segments to the target object.
287
+ Typically a polyline defines an open shape.</p>
288
+
289
+ <h5>Arguments</h5>
290
+
291
+ <p>A list of points that make up the polyline. It is an error
292
+ to define an odd number of points.</p>
293
+
294
+ <h5>Example</h5>
295
+
296
+ <p><a href="javascript:popup('polyline01.rb.html')"><img src=
297
+ "ex/polyline01.gif" title="Click to see the example script"
298
+ alt="polyline example" /></a></p>
299
+ </div>
300
+
301
+ <div class="sig">
302
+ <h4 id='rect'>rect</h4>
303
+
304
+ <p><span class="arg">obj</span>.rect(<span class=
305
+ "arg">width</span>, <span class="arg">height</span>,
306
+ <span class="arg">x</span>=0, <span class="arg">y</span>=0)
307
+ -&gt; <span class="arg">aRect</span></p>
308
+ </div>
309
+
310
+ <div class="desc">
311
+ <h5>Description</h5>
312
+
313
+ <p>Adds a rectangle to the target object.</p>
314
+
315
+ <h5>Arguments</h5>
316
+
317
+ <dl>
318
+ <dt>width, height</dt>
319
+
320
+ <dd>The width and height of the rectangle</dd>
321
+
322
+ <dt>x, y</dt>
323
+
324
+ <dd>The <em>x</em>- and <em>y</em>-axis coordinates of the
325
+ upper-left corner</dd>
326
+ </dl>
327
+
328
+ <h5>Example</h5>
329
+
330
+ <p><a href="javascript:popup('rect01.rb.html')"><img src=
331
+ "ex/rect01.gif" title="Click to see the example script" alt=
332
+ "rect example" /></a></p>
333
+
334
+ <h5>Rounded rectangles</h5>
335
+
336
+ <p>You can define a rounded rectangle by chaining the
337
+ <code>round</code> method to <code>rect</code>:</p>
338
+
339
+ <p><span class="arg">obj</span>.rect(<span class=
340
+ "arg">width</span>, <span class="arg">height</span>,
341
+ <span class="arg">x</span>=0, <span class=
342
+ "arg">y</span>=0).round(<code>rx</code>[, <code>ry</code>])</p>
343
+
344
+ <p>The round method accepts two arguments.</p>
345
+
346
+ <dl>
347
+ <dt>rx</dt>
348
+
349
+ <dd>The x-axis radius of the ellipse used to round off the
350
+ corners of the rectangle</dd>
351
+
352
+ <dt>ry</dt>
353
+
354
+ <dd>The y-axis radius of the ellipse used to round off the
355
+ corners of the rectangle</dd>
356
+ </dl>
357
+
358
+ <p>If the second argument is omitted it defaults to the value
359
+ of the first argument.</p>
360
+
361
+ <h5>Example</h5>
362
+
363
+ <p><a href="javascript:popup('rect02.rb.html')"><img src=
364
+ "ex/rect02.gif" title="Click to see the example script" alt=
365
+ "rect example" /></a></p>
366
+ </div>
367
+
368
+ <p class="spacer">&nbsp;</p>
369
+
370
+ <div class="nav">
371
+ &laquo; <a href="rvgstyle.html">Prev</a> | <a href=
372
+ "index.html">Contents</a> | <a href="rvgxform.html">Next</a>
373
+ &raquo;
374
+ </div>
375
+ </body>
376
+ </html>
@@ -0,0 +1,269 @@
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=
7
+ "HTML Tidy for Linux/x86 (vers 1st March 2005), see www.w3.org" />
8
+
9
+ <title>RMagick: RVG Reference: Styles</title>
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=
14
+ "Copyright (C) 2005 by Timothy P. Hunter" />
15
+ <link rel="stylesheet" type="text/css" href="css/doc.css" />
16
+ <script type="text/javascript" src="scripts/doc.js">
17
+ </script>
18
+ <script type="text/javascript">
19
+ //<![CDATA[
20
+ //]]>
21
+ </script>
22
+ <style type="text/css">
23
+ /*<![CDATA[*/
24
+ }
25
+ /*]]>*/
26
+ </style>
27
+ </head>
28
+
29
+ <body>
30
+ <h6 id="header">RMagick User's Guide and Reference</h6>
31
+
32
+ <div class="nav">
33
+ &laquo;&nbsp;<a href="rvguse.html">Prev</a> | <a href=
34
+ "index.html">Contents</a> | <a href=
35
+ "rvgshape.html">Next</a>&nbsp;&raquo;
36
+ </div>
37
+
38
+ <h1>The styles method</h1>
39
+
40
+ <div id="toc">
41
+ <h2>Table of Contents</h2>
42
+
43
+ <h3>instance methods</h3>
44
+
45
+ <div>
46
+ <ul>
47
+ <li><a href="#styles">styles</a></li>
48
+ </ul>
49
+ </div>
50
+ </div>
51
+
52
+ <h2 class="methods">styles</h2>
53
+
54
+ <div class="sig">
55
+ <h3 id='styles'>styles</h3>
56
+
57
+ <p><span class="arg">obj.</span>styles(<span class=
58
+ "arg">:style=&gt;value</span>[, <span class=
59
+ "arg">:style=&gt;value</span>...]) [{|obj| }] -&gt;
60
+ <span class="arg">obj</span></p>
61
+ </div>
62
+
63
+ <div class="desc">
64
+ <h4>Description</h4>
65
+
66
+ <p>Assigns <em>styles</em> to the target object, which may be a
67
+ container, shape, text, raster image, or pattern. Styles are
68
+ presentational attributes that define how the object is
69
+ rendered.</p>
70
+
71
+ <p><code>Styles</code> yields to a block if a block is present,
72
+ passing the target object as an argument. This is useful when
73
+ <code>styles</code> is chained to a container constructor
74
+ method such as <a href="rvg.html#RVG_g">g</a> or <a href=
75
+ "rvg.html#RVG_rvg">rvg</a>. By default, objects within a
76
+ container get the styles defined on the container.</p>
77
+
78
+ <p><code>Styles</code> returns the target object, so other
79
+ methods can be chained to it.</p>
80
+
81
+ <h4>Arguments</h4>
82
+
83
+ <p>The argument is a hash. The hash keys are style name
84
+ symbols. The hash values are the style values. RVG supports the
85
+ following style names.</p>
86
+
87
+ <dl>
88
+ <dt>:clip_path</dt>
89
+
90
+ <dd>An outline used to clip a shape or collection of shapes.
91
+ The value is an <a href="rvgclip.html#new">clipping path</a>.</dd>
92
+
93
+ <dt>:clip_rule</dt>
94
+
95
+ <dd>If the <code>clip_path</code> style is used, how to
96
+ determine if a point is inside or outside a the clip path.
97
+ The value is a string, either 'nonzero' or 'evenodd'. The
98
+ default is 'nonzero'. See the <code>fill_rule</code> example
99
+ below.</dd>
100
+
101
+ <dt>:fill</dt>
102
+
103
+ <dd>The fill color. The value must be a <a href=
104
+ "imusage.html#color_names">color name</a> or a <a href=
105
+ "rvgpattern.html#new">pattern</a>. The default is
106
+ 'black'.</dd>
107
+
108
+ <dt>:fill_opacity</dt>
109
+
110
+ <dd>The opacity of the fill color. A number between 0.0
111
+ (fully transparent) and 1.0 (fully opaque). The default is
112
+ 1.0</dd>
113
+
114
+ <dt>:fill_rule</dt>
115
+
116
+ <dd>How to determine if a point is inside or outside a shape.
117
+ The value is a string, either 'nonzero' or 'evenodd'. The
118
+ default is 'nonzero'.</dd>
119
+
120
+ <dd>
121
+ The following descriptions of 'nonzero' and 'evenodd' are
122
+ from the <a href=
123
+ "http://www.w3.org/TR/SVG11/painting.html#FillProperties">SVG
124
+ 1.1 standard</a>.
125
+
126
+ <dl>
127
+ <dt>nonzero</dt>
128
+
129
+ <dd>This rule determines the "insideness" of a point on
130
+ the canvas by drawing a ray from that point to infinity
131
+ in any direction and then examining the places where a
132
+ segment of the shape crosses the ray. Starting with a
133
+ count of zero, add one each time a path segment crosses
134
+ the ray from left to right and subtract one each time a
135
+ path segment crosses the ray from right to left. After
136
+ counting the crossings, if the result is zero then the
137
+ point is outside the path. Otherwise, it is inside.</dd>
138
+
139
+ <dt>evenodd</dt>
140
+
141
+ <dd>This rule determines the "insideness" of a point on
142
+ the canvas by drawing a ray from that point to infinity
143
+ in any direction and counting the number of path segments
144
+ from the given shape that the ray crosses. If this number
145
+ is odd, the point is inside; if even, the point is
146
+ outside.</dd>
147
+ </dl>
148
+ </dd>
149
+
150
+ <dd>See the examples below.</dd>
151
+
152
+ <dt>:opacity</dt>
153
+
154
+ <dd>Both the stroke and the fill opacity. A number between
155
+ 0.0 (fully transparent) and 1.0 (fully opaque). The default
156
+ is 1.0. See below for an example.</dd>
157
+
158
+ <dt>:stroke</dt>
159
+
160
+ <dd>The stroke color. The value must be a <a href=
161
+ "imusage.html#color_names">color name</a> or a <a href=
162
+ "rvgpattern.html#new">pattern</a>. The default is 'none',
163
+ that is, transparent black ("#000000ff").</dd>
164
+
165
+ <dt>:stroke_dasharray</dt>
166
+
167
+ <dd>An array of numbers that specify the length of the dashes
168
+ and gaps with which to draw a dashed line. If the array
169
+ contains an odd number of values, the values are repeated to
170
+ produce an even number of dashes and gaps. The numbers are in
171
+ user coordinates. By default all lines are drawn as solid
172
+ lines. See below for an example.</dd>
173
+
174
+ <dt>:stroke_dashoffset</dt>
175
+
176
+ <dd>Normally a dashed line is drawn using the first number in
177
+ the stroke_dasharray as the length of the first dash. This
178
+ style can be used to specify a different starting point in
179
+ the array.</dd>
180
+
181
+ <dt>:stroke_linecap</dt>
182
+
183
+ <dd>The shape of the end of a line. The value may be one of
184
+ the strings 'butt', 'round', or 'square'. The default is
185
+ 'butt'. See below for an example.</dd>
186
+
187
+ <dt>:stroke_linejoin</dt>
188
+
189
+ <dd>The shape of the corner where two lines are joined. The
190
+ value may be one of the strings 'miter', 'round', or 'bevel'.
191
+ The default is 'miter'. See below for an example.</dd>
192
+
193
+ <dt>:stroke_miterlimit</dt>
194
+
195
+ <dd>If the <code>stroke_linejoin</code> value is 'miter', a
196
+ number specifying the ratio of the miter to the thickness of
197
+ the lines being joined. When the limit is exceeded the join
198
+ is converted from a miter to a bevel. The value must be a
199
+ number greater than or equal to 1.0. The default is 4.0.</dd>
200
+
201
+ <dt>:stroke_opacity</dt>
202
+
203
+ <dd>The opacity of the stroke color. A number between 0.0
204
+ (fully transparent) and 1.0 (fully opaque). The default is
205
+ 1.0 unless <code>stroke</code> has the default value
206
+ 'none'.</dd>
207
+
208
+ <dt>:stroke_width</dt>
209
+
210
+ <dd>The thickness of the stroke. The default is 1 user
211
+ coordinate.</dd>
212
+ </dl>
213
+
214
+ <p>(Text styles are described with the <a href=
215
+ "rvgtext.html#new">Text</a> class.)</p>
216
+
217
+ <h4>Examples</h4>
218
+
219
+ <p><strong>:fill=&gt;'#00ff00', :stroke=&gt;'blue',
220
+ :stroke_width=&gt;8</strong><a href=
221
+ "javascript:popup('stroke_fill.rb.html')"><img src=
222
+ "ex/stroke_fill.gif" title="Click to see the example script"
223
+ alt="stroke and fill example" /></a></p>
224
+
225
+ <p><strong>:fill_rule=&gt;'nonzero'</strong><a href=
226
+ "javascript:popup('nonzero.rb.html')"><img src="ex/nonzero.gif"
227
+ title="Click to see the example script" alt=
228
+ "nonzero example" /></a></p>
229
+
230
+ <p><strong>:fill_rule=&gt;'evenodd'</strong><a href=
231
+ "javascript:popup('evenodd.rb.html')"><img src="ex/evenodd.gif"
232
+ title="Click to see the example script" alt=
233
+ "evenodd example" /></a></p>
234
+
235
+ <p><strong>Three values of :opacity</strong><a href=
236
+ "javascript:popup('rvg_opacity.rb.html')"><img src=
237
+ "ex/rvg_opacity.gif" title="Click to see the example script"
238
+ alt="opacity example" /></a></p>
239
+
240
+ <p><strong>:stroke_dasharray=&gt;[10,5]</strong><a href=
241
+ "javascript:popup('rvg_stroke_dasharray.rb.html')"><img src=
242
+ "ex/rvg_stroke_dasharray.gif" title=
243
+ "Click to see the example script" alt=
244
+ "stroke_dasharray example" /></a></p>
245
+
246
+ <p><strong>Three values of :stroke_linecap</strong><a href=
247
+ "javascript:popup('rvg_linecap.rb.html')"><img src=
248
+ "ex/rvg_linecap.gif" title="Click to see the example script"
249
+ alt="stroke_linecap example" /></a></p>
250
+
251
+ <p><strong>Three values of :stroke_linejoin</strong><a href=
252
+ "javascript:popup('rvg_linejoin.rb.html')"><img src=
253
+ "ex/rvg_linejoin.gif" title="Click to see the example script"
254
+ alt="stroke_linejoin example" /></a></p>
255
+
256
+ <h4>Returns</h4>
257
+
258
+ <p><span class="arg">obj</span></p>
259
+ </div>
260
+
261
+ <p class="spacer">&nbsp;</p>
262
+
263
+ <div class="nav">
264
+ &laquo; <a href="rvguse.html">Prev</a> | <a href=
265
+ "index.html">Contents</a> | <a href="rvgshape.html">Next</a>
266
+ &raquo;
267
+ </div>
268
+ </body>
269
+ </html>