rdp-rmagick 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. data/ChangeLog +769 -0
  2. data/Doxyfile +1514 -0
  3. data/README-Mac-OSX.txt +1 -0
  4. data/README.md +231 -0
  5. data/build_tarball.rake +215 -0
  6. data/doc/comtasks.html +287 -0
  7. data/doc/constants.html +1581 -0
  8. data/doc/css/doc.css +299 -0
  9. data/doc/css/popup.css +34 -0
  10. data/doc/css/ref.css +67 -0
  11. data/doc/draw.html +3269 -0
  12. data/doc/ex/InitialCoords.rb +23 -0
  13. data/doc/ex/NewCoordSys.rb +32 -0
  14. data/doc/ex/OrigCoordSys.rb +18 -0
  15. data/doc/ex/PreserveAspectRatio.rb +205 -0
  16. data/doc/ex/RotateScale.rb +37 -0
  17. data/doc/ex/Skew.rb +38 -0
  18. data/doc/ex/Use01.rb +16 -0
  19. data/doc/ex/Use02.rb +21 -0
  20. data/doc/ex/Use03.rb +16 -0
  21. data/doc/ex/ViewBox.rb +33 -0
  22. data/doc/ex/adaptive_threshold.rb +10 -0
  23. data/doc/ex/add_noise.rb +17 -0
  24. data/doc/ex/affine.rb +48 -0
  25. data/doc/ex/affine_transform.rb +20 -0
  26. data/doc/ex/arc.rb +49 -0
  27. data/doc/ex/arcpath.rb +33 -0
  28. data/doc/ex/arcs01.rb +28 -0
  29. data/doc/ex/arcs02.rb +61 -0
  30. data/doc/ex/average.rb +15 -0
  31. data/doc/ex/axes.rb +64 -0
  32. data/doc/ex/baseline_shift01.rb +18 -0
  33. data/doc/ex/bilevel_channel.rb +9 -0
  34. data/doc/ex/blur_image.rb +12 -0
  35. data/doc/ex/border.rb +10 -0
  36. data/doc/ex/bounding_box.rb +44 -0
  37. data/doc/ex/cbezier1.rb +42 -0
  38. data/doc/ex/cbezier2.rb +42 -0
  39. data/doc/ex/cbezier3.rb +42 -0
  40. data/doc/ex/cbezier4.rb +43 -0
  41. data/doc/ex/cbezier5.rb +43 -0
  42. data/doc/ex/cbezier6.rb +53 -0
  43. data/doc/ex/channel.rb +26 -0
  44. data/doc/ex/charcoal.rb +12 -0
  45. data/doc/ex/chop.rb +29 -0
  46. data/doc/ex/circle.rb +33 -0
  47. data/doc/ex/circle01.rb +17 -0
  48. data/doc/ex/clip_path.rb +60 -0
  49. data/doc/ex/coalesce.rb +60 -0
  50. data/doc/ex/color_fill_to_border.rb +29 -0
  51. data/doc/ex/color_floodfill.rb +28 -0
  52. data/doc/ex/color_histogram.rb +48 -0
  53. data/doc/ex/color_reset.rb +11 -0
  54. data/doc/ex/colorize.rb +16 -0
  55. data/doc/ex/colors.rb +64 -0
  56. data/doc/ex/compose_mask.rb +23 -0
  57. data/doc/ex/composite.rb +135 -0
  58. data/doc/ex/composite_layers.rb +53 -0
  59. data/doc/ex/composite_tiled.rb +23 -0
  60. data/doc/ex/contrast.rb +36 -0
  61. data/doc/ex/crop.rb +31 -0
  62. data/doc/ex/crop_with_gravity.rb +46 -0
  63. data/doc/ex/cubic01.rb +45 -0
  64. data/doc/ex/cubic02.rb +94 -0
  65. data/doc/ex/cycle_colormap.rb +21 -0
  66. data/doc/ex/dissolve.rb +13 -0
  67. data/doc/ex/drawcomp.rb +42 -0
  68. data/doc/ex/drop_shadow.rb +60 -0
  69. data/doc/ex/edge.rb +11 -0
  70. data/doc/ex/ellipse.rb +45 -0
  71. data/doc/ex/ellipse01.rb +22 -0
  72. data/doc/ex/emboss.rb +11 -0
  73. data/doc/ex/enhance.rb +28 -0
  74. data/doc/ex/equalize.rb +11 -0
  75. data/doc/ex/evenodd.rb +43 -0
  76. data/doc/ex/fill_pattern.rb +26 -0
  77. data/doc/ex/flatten_images.rb +36 -0
  78. data/doc/ex/flip.rb +11 -0
  79. data/doc/ex/flop.rb +11 -0
  80. data/doc/ex/font_styles.rb +34 -0
  81. data/doc/ex/fonts.rb +20 -0
  82. data/doc/ex/frame.rb +12 -0
  83. data/doc/ex/gaussian_blur.rb +11 -0
  84. data/doc/ex/get_multiline_type_metrics.rb +42 -0
  85. data/doc/ex/get_pixels.rb +48 -0
  86. data/doc/ex/get_type_metrics.rb +146 -0
  87. data/doc/ex/gradientfill.rb +27 -0
  88. data/doc/ex/grav.rb +46 -0
  89. data/doc/ex/gravity.rb +79 -0
  90. data/doc/ex/group.rb +26 -0
  91. data/doc/ex/hatchfill.rb +27 -0
  92. data/doc/ex/image.rb +46 -0
  93. data/doc/ex/images/Apple.miff +0 -0
  94. data/doc/ex/images/Ballerina.jpg +0 -0
  95. data/doc/ex/images/Ballerina3.jpg +0 -0
  96. data/doc/ex/images/Button_0.gif +0 -0
  97. data/doc/ex/images/Button_1.gif +0 -0
  98. data/doc/ex/images/Button_2.gif +0 -0
  99. data/doc/ex/images/Button_3.gif +0 -0
  100. data/doc/ex/images/Button_4.gif +0 -0
  101. data/doc/ex/images/Button_5.gif +0 -0
  102. data/doc/ex/images/Button_6.gif +0 -0
  103. data/doc/ex/images/Button_7.gif +0 -0
  104. data/doc/ex/images/Button_8.gif +0 -0
  105. data/doc/ex/images/Button_9.gif +0 -0
  106. data/doc/ex/images/Button_A.gif +0 -0
  107. data/doc/ex/images/Button_B.gif +0 -0
  108. data/doc/ex/images/Button_C.gif +0 -0
  109. data/doc/ex/images/Button_D.gif +0 -0
  110. data/doc/ex/images/Button_E.gif +0 -0
  111. data/doc/ex/images/Button_F.gif +0 -0
  112. data/doc/ex/images/Button_G.gif +0 -0
  113. data/doc/ex/images/Button_H.gif +0 -0
  114. data/doc/ex/images/Button_I.gif +0 -0
  115. data/doc/ex/images/Button_J.gif +0 -0
  116. data/doc/ex/images/Button_K.gif +0 -0
  117. data/doc/ex/images/Button_L.gif +0 -0
  118. data/doc/ex/images/Button_M.gif +0 -0
  119. data/doc/ex/images/Button_N.gif +0 -0
  120. data/doc/ex/images/Button_O.gif +0 -0
  121. data/doc/ex/images/Button_P.gif +0 -0
  122. data/doc/ex/images/Button_Q.gif +0 -0
  123. data/doc/ex/images/Button_R.gif +0 -0
  124. data/doc/ex/images/Button_S.gif +0 -0
  125. data/doc/ex/images/Button_T.gif +0 -0
  126. data/doc/ex/images/Button_U.gif +0 -0
  127. data/doc/ex/images/Button_V.gif +0 -0
  128. data/doc/ex/images/Button_W.gif +0 -0
  129. data/doc/ex/images/Button_X.gif +0 -0
  130. data/doc/ex/images/Button_Y.gif +0 -0
  131. data/doc/ex/images/Button_Z.gif +0 -0
  132. data/doc/ex/images/Cheetah.jpg +0 -0
  133. data/doc/ex/images/Coffee.wmf +0 -0
  134. data/doc/ex/images/Flower_Hat.jpg +0 -0
  135. data/doc/ex/images/Gold_Statue.jpg +0 -0
  136. data/doc/ex/images/Hot_Air_Balloons.jpg +0 -0
  137. data/doc/ex/images/Hot_Air_Balloons_H.jpg +0 -0
  138. data/doc/ex/images/Leaf.miff +0 -0
  139. data/doc/ex/images/No.wmf +0 -0
  140. data/doc/ex/images/Polynesia.jpg +0 -0
  141. data/doc/ex/images/Red_Rocks.jpg +0 -0
  142. data/doc/ex/images/Rocks_On_Beach.miff +0 -0
  143. data/doc/ex/images/Shorts.jpg +0 -0
  144. data/doc/ex/images/Snake.wmf +0 -0
  145. data/doc/ex/images/Violin.jpg +0 -0
  146. data/doc/ex/images/Yellow_Rose.miff +0 -0
  147. data/doc/ex/images/big-duck.gif +0 -0
  148. data/doc/ex/images/duck.gif +0 -0
  149. data/doc/ex/images/duck0.gif +0 -0
  150. data/doc/ex/images/duck1.gif +0 -0
  151. data/doc/ex/images/duck10.gif +0 -0
  152. data/doc/ex/images/duck11.gif +0 -0
  153. data/doc/ex/images/duck12.gif +0 -0
  154. data/doc/ex/images/duck13.gif +0 -0
  155. data/doc/ex/images/duck14.gif +0 -0
  156. data/doc/ex/images/duck15.gif +0 -0
  157. data/doc/ex/images/duck2.gif +0 -0
  158. data/doc/ex/images/duck3.gif +0 -0
  159. data/doc/ex/images/duck4.gif +0 -0
  160. data/doc/ex/images/duck5.gif +0 -0
  161. data/doc/ex/images/duck6.gif +0 -0
  162. data/doc/ex/images/duck7.gif +0 -0
  163. data/doc/ex/images/duck8.gif +0 -0
  164. data/doc/ex/images/duck9.gif +0 -0
  165. data/doc/ex/images/graydient230x6.gif +0 -0
  166. data/doc/ex/images/logo400x83.gif +0 -0
  167. data/doc/ex/images/model.miff +0 -0
  168. data/doc/ex/images/notimplemented.gif +0 -0
  169. data/doc/ex/images/smile.miff +0 -0
  170. data/doc/ex/images/spin.gif +0 -0
  171. data/doc/ex/implode.rb +34 -0
  172. data/doc/ex/level.rb +11 -0
  173. data/doc/ex/level_colors.rb +11 -0
  174. data/doc/ex/line.rb +42 -0
  175. data/doc/ex/line01.rb +23 -0
  176. data/doc/ex/mask.rb +36 -0
  177. data/doc/ex/matte_fill_to_border.rb +40 -0
  178. data/doc/ex/matte_floodfill.rb +33 -0
  179. data/doc/ex/matte_replace.rb +40 -0
  180. data/doc/ex/median_filter.rb +28 -0
  181. data/doc/ex/modulate.rb +11 -0
  182. data/doc/ex/mono.rb +23 -0
  183. data/doc/ex/morph.rb +26 -0
  184. data/doc/ex/mosaic.rb +35 -0
  185. data/doc/ex/motion_blur.rb +11 -0
  186. data/doc/ex/negate.rb +11 -0
  187. data/doc/ex/negate_channel.rb +9 -0
  188. data/doc/ex/nested_rvg.rb +21 -0
  189. data/doc/ex/nonzero.rb +43 -0
  190. data/doc/ex/normalize.rb +11 -0
  191. data/doc/ex/oil_paint.rb +11 -0
  192. data/doc/ex/opacity.rb +37 -0
  193. data/doc/ex/ordered_dither.rb +11 -0
  194. data/doc/ex/path.rb +64 -0
  195. data/doc/ex/pattern1.rb +25 -0
  196. data/doc/ex/pattern2.rb +26 -0
  197. data/doc/ex/polaroid.rb +28 -0
  198. data/doc/ex/polygon.rb +24 -0
  199. data/doc/ex/polygon01.rb +23 -0
  200. data/doc/ex/polyline.rb +23 -0
  201. data/doc/ex/polyline01.rb +23 -0
  202. data/doc/ex/posterize.rb +8 -0
  203. data/doc/ex/preview.rb +9 -0
  204. data/doc/ex/qbezierpath.rb +52 -0
  205. data/doc/ex/quad01.rb +36 -0
  206. data/doc/ex/quantize-m.rb +25 -0
  207. data/doc/ex/radial_blur.rb +9 -0
  208. data/doc/ex/raise.rb +8 -0
  209. data/doc/ex/random_threshold_channel.rb +13 -0
  210. data/doc/ex/rect01.rb +15 -0
  211. data/doc/ex/rect02.rb +22 -0
  212. data/doc/ex/rectangle.rb +35 -0
  213. data/doc/ex/reduce_noise.rb +28 -0
  214. data/doc/ex/remap.rb +12 -0
  215. data/doc/ex/remap_images.rb +21 -0
  216. data/doc/ex/resize_to_fill.rb +10 -0
  217. data/doc/ex/resize_to_fit.rb +10 -0
  218. data/doc/ex/roll.rb +9 -0
  219. data/doc/ex/rotate.rb +45 -0
  220. data/doc/ex/rotate_f.rb +14 -0
  221. data/doc/ex/roundrect.rb +34 -0
  222. data/doc/ex/rubyname.rb +30 -0
  223. data/doc/ex/rvg_clippath.rb +14 -0
  224. data/doc/ex/rvg_linecap.rb +43 -0
  225. data/doc/ex/rvg_linejoin.rb +41 -0
  226. data/doc/ex/rvg_opacity.rb +19 -0
  227. data/doc/ex/rvg_pattern.rb +26 -0
  228. data/doc/ex/rvg_stroke_dasharray.rb +12 -0
  229. data/doc/ex/segment.rb +11 -0
  230. data/doc/ex/sepiatone.rb +8 -0
  231. data/doc/ex/shade.rb +11 -0
  232. data/doc/ex/shadow.rb +31 -0
  233. data/doc/ex/shave.rb +15 -0
  234. data/doc/ex/shear.rb +10 -0
  235. data/doc/ex/sketch.rb +18 -0
  236. data/doc/ex/skewx.rb +52 -0
  237. data/doc/ex/skewy.rb +47 -0
  238. data/doc/ex/smile.rb +125 -0
  239. data/doc/ex/solarize.rb +11 -0
  240. data/doc/ex/sparse_color.rb +55 -0
  241. data/doc/ex/splice.rb +9 -0
  242. data/doc/ex/spread.rb +11 -0
  243. data/doc/ex/stegano.rb +55 -0
  244. data/doc/ex/stroke_dasharray.rb +43 -0
  245. data/doc/ex/stroke_fill.rb +11 -0
  246. data/doc/ex/stroke_linecap.rb +44 -0
  247. data/doc/ex/stroke_linejoin.rb +48 -0
  248. data/doc/ex/stroke_width.rb +49 -0
  249. data/doc/ex/swirl.rb +17 -0
  250. data/doc/ex/text.rb +37 -0
  251. data/doc/ex/text01.rb +17 -0
  252. data/doc/ex/text_align.rb +36 -0
  253. data/doc/ex/text_antialias.rb +38 -0
  254. data/doc/ex/text_styles.rb +21 -0
  255. data/doc/ex/text_undercolor.rb +28 -0
  256. data/doc/ex/texture_fill_to_border.rb +34 -0
  257. data/doc/ex/texture_floodfill.rb +32 -0
  258. data/doc/ex/texturefill.rb +25 -0
  259. data/doc/ex/threshold.rb +13 -0
  260. data/doc/ex/to_blob.rb +14 -0
  261. data/doc/ex/translate.rb +39 -0
  262. data/doc/ex/transparent.rb +38 -0
  263. data/doc/ex/transpose.rb +9 -0
  264. data/doc/ex/transverse.rb +9 -0
  265. data/doc/ex/tref01.rb +25 -0
  266. data/doc/ex/triangle01.rb +16 -0
  267. data/doc/ex/trim.rb +24 -0
  268. data/doc/ex/tspan01.rb +18 -0
  269. data/doc/ex/tspan02.rb +19 -0
  270. data/doc/ex/tspan03.rb +21 -0
  271. data/doc/ex/unsharp_mask.rb +28 -0
  272. data/doc/ex/viewex.rb +35 -0
  273. data/doc/ex/vignette.rb +12 -0
  274. data/doc/ex/watermark.rb +28 -0
  275. data/doc/ex/wave.rb +9 -0
  276. data/doc/ex/wet_floor.rb +59 -0
  277. data/doc/ex/writing_mode01.rb +27 -0
  278. data/doc/ex/writing_mode02.rb +26 -0
  279. data/doc/ilist.html +2056 -0
  280. data/doc/image1.html +4680 -0
  281. data/doc/image2.html +3665 -0
  282. data/doc/image3.html +4522 -0
  283. data/doc/imageattrs.html +1638 -0
  284. data/doc/imusage.html +514 -0
  285. data/doc/index.html +416 -0
  286. data/doc/info.html +1499 -0
  287. data/doc/magick.html +565 -0
  288. data/doc/optequiv.html +2435 -0
  289. data/doc/rvg.html +975 -0
  290. data/doc/rvgclip.html +248 -0
  291. data/doc/rvggroup.html +305 -0
  292. data/doc/rvgimage.html +289 -0
  293. data/doc/rvgpattern.html +475 -0
  294. data/doc/rvgshape.html +406 -0
  295. data/doc/rvgstyle.html +270 -0
  296. data/doc/rvgtext.html +465 -0
  297. data/doc/rvgtspan.html +238 -0
  298. data/doc/rvgtut.html +530 -0
  299. data/doc/rvguse.html +145 -0
  300. data/doc/rvgxform.html +294 -0
  301. data/doc/scripts/doc.js +22 -0
  302. data/doc/scripts/stripeTables.js +23 -0
  303. data/doc/struct.html +1339 -0
  304. data/doc/usage.html +1621 -0
  305. data/examples/constitute.rb +7 -0
  306. data/examples/crop_with_gravity.rb +46 -0
  307. data/examples/demo.rb +324 -0
  308. data/examples/describe.rb +44 -0
  309. data/examples/find_similar_region.rb +34 -0
  310. data/examples/histogram.rb +325 -0
  311. data/examples/identify.rb +187 -0
  312. data/examples/image_opacity.rb +29 -0
  313. data/examples/import_export.rb +31 -0
  314. data/examples/pattern_fill.rb +38 -0
  315. data/examples/rotating_text.rb +45 -0
  316. data/examples/spinner.rb +50 -0
  317. data/examples/thumbnail.rb +65 -0
  318. data/examples/vignette.rb +79 -0
  319. data/ext/RMagick/Makefile +180 -0
  320. data/ext/RMagick/RMagick2.so +0 -0
  321. data/ext/RMagick/extconf.h +119 -0
  322. data/ext/RMagick/extconf.rb +406 -0
  323. data/ext/RMagick/mkmf.log +3022 -0
  324. data/ext/RMagick/rmagick.c +394 -0
  325. data/ext/RMagick/rmagick.h +1307 -0
  326. data/ext/RMagick/rmagick.o +0 -0
  327. data/ext/RMagick/rmdraw.c +1991 -0
  328. data/ext/RMagick/rmdraw.o +0 -0
  329. data/ext/RMagick/rmenum.c +1224 -0
  330. data/ext/RMagick/rmenum.o +0 -0
  331. data/ext/RMagick/rmfill.c +717 -0
  332. data/ext/RMagick/rmfill.o +0 -0
  333. data/ext/RMagick/rmilist.c +1217 -0
  334. data/ext/RMagick/rmilist.o +0 -0
  335. data/ext/RMagick/rmimage.c +15099 -0
  336. data/ext/RMagick/rmimage.o +0 -0
  337. data/ext/RMagick/rminfo.c +2567 -0
  338. data/ext/RMagick/rminfo.o +0 -0
  339. data/ext/RMagick/rmmain.c +1705 -0
  340. data/ext/RMagick/rmmain.o +0 -0
  341. data/ext/RMagick/rmmontage.c +511 -0
  342. data/ext/RMagick/rmmontage.o +0 -0
  343. data/ext/RMagick/rmpixel.c +1103 -0
  344. data/ext/RMagick/rmpixel.o +0 -0
  345. data/ext/RMagick/rmstruct.c +1047 -0
  346. data/ext/RMagick/rmstruct.o +0 -0
  347. data/ext/RMagick/rmutil.c +1730 -0
  348. data/ext/RMagick/rmutil.o +0 -0
  349. data/lib/RMagick.rb +1962 -0
  350. data/lib/rvg/clippath.rb +48 -0
  351. data/lib/rvg/container.rb +131 -0
  352. data/lib/rvg/deep_equal.rb +56 -0
  353. data/lib/rvg/describable.rb +53 -0
  354. data/lib/rvg/embellishable.rb +417 -0
  355. data/lib/rvg/misc.rb +740 -0
  356. data/lib/rvg/paint.rb +55 -0
  357. data/lib/rvg/pathdata.rb +131 -0
  358. data/lib/rvg/rvg.rb +283 -0
  359. data/lib/rvg/stretchable.rb +168 -0
  360. data/lib/rvg/stylable.rb +124 -0
  361. data/lib/rvg/text.rb +187 -0
  362. data/lib/rvg/to_c.rb +103 -0
  363. data/lib/rvg/transformable.rb +133 -0
  364. data/lib/rvg/units.rb +66 -0
  365. data/metaconfig +7 -0
  366. data/post-clean.rb +12 -0
  367. data/post-install.rb +50 -0
  368. data/post-setup.rb +254 -0
  369. data/rmagick.gemspec +20 -0
  370. data/setup.rb +1585 -0
  371. data/test/Draw.rb +121 -0
  372. data/test/Image1.rb +762 -0
  373. data/test/Image2.rb +1308 -0
  374. data/test/Image3.rb +1001 -0
  375. data/test/ImageList1.rb +808 -0
  376. data/test/ImageList2.rb +389 -0
  377. data/test/Image_attributes.rb +682 -0
  378. data/test/Import_Export.rb +116 -0
  379. data/test/Info.rb +349 -0
  380. data/test/Magick.rb +364 -0
  381. data/test/Pixel.rb +120 -0
  382. data/test/Preview.rb +62 -0
  383. data/test/all_basic.rb +39 -0
  384. data/test/cmyk.icm +0 -0
  385. data/test/srgb.icm +0 -0
  386. data/test/test.0 +0 -0
  387. data/uninstall.rb +74 -0
  388. metadata +455 -0
@@ -0,0 +1,299 @@
1
+
2
+ /* Global styles. */
3
+
4
+ a:link {
5
+ text-decoration: none;
6
+ }
7
+
8
+ a:visited {
9
+ color: #7F7FFF;
10
+ text-decoration: none;
11
+ }
12
+
13
+ a:hover {
14
+ text-decoration: underline;
15
+ }
16
+
17
+ a:active {
18
+ color: white;
19
+ background-color: blue;
20
+ text-decoration: underline;
21
+ }
22
+
23
+ body {
24
+ background-color: white;
25
+ color: black;
26
+ font-size: 100.01%;
27
+ }
28
+
29
+ img {
30
+ display: block;
31
+ border-width: 0;
32
+ }
33
+
34
+ h1 {
35
+ background-color: #900;
36
+ font-size: x-large;
37
+ font-weight: bold;
38
+ color: #ebebeb;
39
+ padding: .3em 5px .5em 5px;
40
+ margin: 0 0;
41
+ }
42
+
43
+ h6#header {
44
+ padding-top: 0.5em;
45
+ font-size: small;
46
+ font-weight: bold;
47
+ color: #545454;
48
+ letter-spacing: .5em;
49
+ text-align: center;
50
+ margin: 0 0;
51
+ }
52
+
53
+ /*
54
+ * Table of Contents styles
55
+ */
56
+ #toc h2 {
57
+ background-color: #545454;
58
+ color: white;
59
+ padding: 5px .3em .3em .3em;
60
+ margin: 0 0;
61
+ }
62
+
63
+ #toc h3 {
64
+ clear: both;
65
+ padding-left: 5px;
66
+ padding-right: 1em;
67
+ border-bottom: thin solid black;
68
+ }
69
+
70
+ #toc ul {
71
+ list-style: none;
72
+ }
73
+
74
+ .toccol {
75
+ float: left;
76
+ width: 33%;
77
+ }
78
+
79
+ /*
80
+ * Navigation bar. Appears at both top and bottom.
81
+ */
82
+ div.nav {
83
+ clear: both;
84
+ background-color: #900;
85
+ color: white;
86
+ font-size: 8pt;
87
+ font-family: sans-serif;
88
+ font-weight: bold;
89
+ margin-bottom: 0;
90
+ margin-top: 1em; /* Separate from header at the top and */
91
+ /* from the last element at the bottom */
92
+ padding: 2px;
93
+ padding-left: 8px;
94
+ padding-right: 8px;
95
+ text-align: right;
96
+ }
97
+
98
+ div.nav a:link {
99
+ text-decoration: none;
100
+ color: white;
101
+ }
102
+
103
+ div.nav a:visited {
104
+ text-decoration: none;
105
+ color: white;
106
+ }
107
+
108
+ div.nav a:hover {
109
+ background-color: white;
110
+ color: #900;
111
+ }
112
+
113
+ div.nav a:active {
114
+ text-decoration: none;
115
+ color: white;
116
+ }
117
+
118
+ span.superclass {
119
+ font-size: normal;
120
+ font-weight: normal;
121
+ }
122
+
123
+ span.mixin {
124
+ font-size: smaller;
125
+ padding-left: 1em;
126
+ }
127
+
128
+ /*
129
+ * Method signatures, descriptions
130
+ */
131
+
132
+ h2.methods { /* "class methods" */
133
+ margin-top: 2em;
134
+ margin-bottom: 0;
135
+ padding: .5em 5px .5em 5px;
136
+ background-color: #663;
137
+ color: white;
138
+ clear: both;
139
+ }
140
+
141
+ /*
142
+ * Method signatures
143
+ */
144
+
145
+ div.sig {
146
+ margin-bottom: .5em;
147
+ }
148
+
149
+ .sig h3 { /* method name: total width 210px */
150
+ background-color: #c0c0c0;
151
+ color: #000;
152
+ width: 225px;
153
+ float: left;
154
+ padding-left: 5px;
155
+ margin-top: 0;
156
+ }
157
+
158
+ .sig p {
159
+ background-color: #c0c0c0;
160
+ color: #000;
161
+ padding-right: 5px;
162
+ padding-left: 230px;
163
+ padding-bottom: 1em;
164
+ margin-top: 0;
165
+ }
166
+
167
+ /*
168
+ * Method descriptions
169
+ */
170
+
171
+ .desc {
172
+ margin-left: 235px;
173
+ margin-bottom: 2em;
174
+ }
175
+
176
+ .desc h4 {
177
+ position: relative;
178
+ left: -235px;
179
+ padding-left: 5px;
180
+ background-image: url(../ex/images/graydient230x6.gif);
181
+ background-repeat: repeat-y;
182
+ color: black;
183
+ font-weight: normal;
184
+ font-size: small;
185
+ padding-bottom: 0;
186
+ margin-bottom: 0;
187
+ margin-top: 0;
188
+ }
189
+
190
+ .desc dl,p,pre,img,ul {
191
+ margin-top: 0;
192
+ }
193
+
194
+ .desc dt {
195
+ font-style: italic;
196
+ /* display: compact; */
197
+ }
198
+
199
+ .arg {
200
+ font-style: italic;
201
+ }
202
+
203
+ /*
204
+ * The next 2 styles are for example scripts.
205
+ */
206
+ .example, .desc pre {
207
+ padding: 0 .5em 1em .5em; /* Tell Konq to not pad at the top. */
208
+ padd\ing-top: 1em; /* Tell everybody else to use 1em padding at the top. */
209
+ background-color: #f8f8f8;
210
+ border-left: thin dotted black;
211
+ border-top: thin dotted black;
212
+ border-bottom: 4px solid #c0c0c0;
213
+ border-right: 4px solid #c0c0c0
214
+ }
215
+
216
+ .example {
217
+ margin-left: 100px;
218
+ margin-right: 100px;
219
+ margin-bottom: 1em;
220
+ }
221
+
222
+ .example_cutline {
223
+ margin-left: 100px;
224
+ margin-right: 100px;
225
+ font-style: italic;
226
+ }
227
+
228
+ /*
229
+ * The following three styles govern the display of example
230
+ * images with rollover effects and the "spin" image that
231
+ * accompanies them.
232
+ */
233
+ /*
234
+ * This <p> encloses example images and the spin image.
235
+ */
236
+ p.rollover {
237
+ position: relative;
238
+ }
239
+
240
+ /*
241
+ * Neither the example image nor the spin.gif get a border.
242
+ */
243
+ .rollover img {
244
+ display: inline;
245
+ border-width: 0;
246
+ }
247
+
248
+ /*
249
+ * The spin.gif image must be positioned at the upper-right
250
+ * corner of the example image.
251
+ */
252
+ img.spin {
253
+ position: absolute;
254
+ top: 0;
255
+ left: 204px;
256
+ }
257
+
258
+ /*
259
+ * Plain small gray tables
260
+ */
261
+ .simple_table {
262
+ border-collapse: collapse;
263
+ border: thin solid black;
264
+ background-color: #f8f8f8;
265
+ margin-bottom: 1em;
266
+ margin-top: 1em;
267
+ width: 100%;
268
+ }
269
+ .simple_table td {
270
+ padding: 3px 1em 3px 1em;
271
+ }
272
+ .simple_table caption {
273
+ font-weight: bold;
274
+ }
275
+
276
+ /*
277
+ * Miscellaneous styles
278
+ */
279
+ /*
280
+ * Insert white space between elements when CSS not enabled.
281
+ */
282
+ p.spacer {
283
+ display: none;
284
+ }
285
+
286
+ /*
287
+ * Text quoted from the xMagick doc.
288
+ */
289
+
290
+ .imquote {
291
+ color: #545454;
292
+ }
293
+ .imquote p, .imquote ul {
294
+ margin-left: 100px;
295
+ margin-right: 100px;
296
+ padding-bottom: 1em;
297
+ }
298
+
299
+
@@ -0,0 +1,34 @@
1
+ /* Styles for the example script popup */
2
+
3
+ body {
4
+ background:#fffff0;
5
+ margin:10px;
6
+ }
7
+
8
+ h1 {
9
+ color: #663;
10
+ width: 100%;
11
+ text-align: center;
12
+ }
13
+
14
+ .bodybox {
15
+ background-color:white;
16
+ border:1px solid black;
17
+ text-align:left;
18
+ }
19
+
20
+ .bodyfloat {
21
+ padding:10px;
22
+ color:black;
23
+ text-align:left;
24
+ }
25
+
26
+ #close {
27
+ width: 100%;
28
+ text-align: center;
29
+ }
30
+
31
+ a:link {
32
+ color:#663;
33
+ font-weight:bold;
34
+ }
@@ -0,0 +1,67 @@
1
+ /* Styles for struct.html and rvgref.html */
2
+
3
+ .subhd h2 { /* Same as h2.methods but different background-color */
4
+ margin-top: 2em;
5
+ margin-bottom: .5em;
6
+ padding: .5em 5px .5em 5px;
7
+ background-color: #545454;
8
+ color: white;
9
+ clear: both;
10
+ }
11
+ .subhd h3 { /* Same as h2.methods */
12
+ margin-top: 0;
13
+ margin-bottom: 0;
14
+ padding: .5em 5px .5em 5px;
15
+ background-color: #663;
16
+ color: white;
17
+ }
18
+ .sig h4, .sig p {
19
+ background-color: #c0c0c0;
20
+ color: #000;
21
+ margin-top: 0;
22
+ }
23
+
24
+ .sig h4 { /* method name: total width 210px */
25
+ width: 205px;
26
+ float: left;
27
+ padding-left: 5px;
28
+ font-size: 110%;
29
+ }
30
+
31
+ .sig p {
32
+ padding-right: 5px;
33
+ padding-bottom: 1em;
34
+ }
35
+
36
+ .desc h5 {
37
+ position: relative;
38
+ left: -235px;
39
+ padding-left: 5px;
40
+ background-image: url(../ex/images/graydient230x6.gif);
41
+ background-repeat: repeat-y;
42
+ color: black;
43
+ font-weight: normal;
44
+ font-size: small;
45
+ padding-bottom: 0;
46
+ margin-bottom: 0;
47
+ margin-top: 0;
48
+ }
49
+
50
+
51
+ .intro p {
52
+ padding-bottom: 1em;
53
+ margin-left: 215px;
54
+ }
55
+
56
+ .intro h3 {
57
+ padding-left: 5px;
58
+ background-color: white;
59
+ background-image: url(../ex/images/graydient230x6.gif);
60
+ background-repeat: repeat-y;
61
+ color: black;
62
+ font-weight: normal;
63
+ font-size: small;
64
+ padding-bottom: 0;
65
+ margin: 0 0;
66
+ }
67
+
@@ -0,0 +1,3269 @@
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 7 December 2008), see www.w3.org" />
8
+
9
+ <title>RMagick 0.0.0: class Draw</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) 2006 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
+ <style type="text/css">
19
+ /*<![CDATA[*/
20
+
21
+ /* Styles local to this page. */
22
+
23
+ /*]]>*/
24
+ </style>
25
+ </head>
26
+
27
+ <body>
28
+ <h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
29
+
30
+ <div class="nav">
31
+ &laquo;&nbsp;<a href="image3.html">Prev</a> | <a href=
32
+ "index.html">Contents</a> | <a href=
33
+ "struct.html">Next</a>&nbsp;&raquo;
34
+ </div>
35
+
36
+ <h1>class Draw <span class="superclass">&lt; Object</span></h1>
37
+
38
+ <div id="toc">
39
+ <h2>Table of Contents</h2>
40
+
41
+ <h3>class methods</h3>
42
+
43
+ <ul>
44
+ <li><a href="#new">new</a></li>
45
+ </ul>
46
+
47
+ <h3>instance methods</h3>
48
+
49
+ <div class="toccol">
50
+ <ul>
51
+ <li><a href="#annotate">annotate</a></li>
52
+
53
+ <li><a href="#clone">clone</a></li>
54
+ </ul>
55
+ </div>
56
+
57
+ <div class="toccol">
58
+ <ul>
59
+ <li><a href="#draw">draw</a></li>
60
+
61
+ <li><a href="#dup">dup</a></li>
62
+ </ul>
63
+ </div>
64
+
65
+ <div class="toccol">
66
+ <ul>
67
+ <li><a href=
68
+ "#get_multiline_type_metrics">get_multiline_type_metrics</a></li>
69
+
70
+ <li><a href="#get_type_metrics">get_type_metrics</a></li>
71
+
72
+ <li><a href="#inspect">inspect</a></li>
73
+ </ul>
74
+ </div>
75
+
76
+ <h3>drawing primitive methods</h3>
77
+
78
+ <div class="toccol">
79
+ <ul>
80
+ <li><a href="#affine">affine</a></li>
81
+
82
+ <li><a href="#arc">arc</a></li>
83
+
84
+ <li><a href="#bezier">bezier</a></li>
85
+
86
+ <li><a href="#circle">circle</a></li>
87
+
88
+ <li><a href="#clip_path">clip_path</a></li>
89
+
90
+ <li><a href="#clip_rule">clip_rule</a></li>
91
+
92
+ <li><a href="#clip_units">clip_units</a></li>
93
+
94
+ <li><a href="#color">color</a></li>
95
+
96
+ <li><a href="#composite">composite</a></li>
97
+
98
+ <li><a href="#decorate">decorate</a></li>
99
+
100
+ <li><a href="#define_clip_path">define_clip_path</a></li>
101
+
102
+ <li><a href="#ellipse">ellipse</a></li>
103
+
104
+ <li><a href="#encoding">encoding</a></li>
105
+
106
+ <li><a href="#fill">fill</a></li>
107
+
108
+ <li><a href="#fill_opacity">fill_opacity</a></li>
109
+
110
+ <li><a href="#fill_rule">fill_rule</a></li>
111
+
112
+ <li><a href="#font">font</a></li>
113
+
114
+ <li><a href="#font_family">font_family</a></li>
115
+
116
+ <li><a href="#font_stretch">font_stretch</a></li>
117
+ </ul>
118
+ </div>
119
+
120
+ <div class="toccol">
121
+ <ul>
122
+ <li><a href="#font_style">font_style</a></li>
123
+
124
+ <li><a href="#font_weight">font_weight</a></li>
125
+
126
+ <li><a href="#gravity">gravity</a></li>
127
+
128
+ <li><a href="#interline_spacing">interline_spacing</a></li>
129
+
130
+ <li><a href="#interword_spacing">interword_spacing</a></li>
131
+
132
+ <li><a href="#kerning">kerning</a></li>
133
+
134
+ <li><a href="#line">line</a></li>
135
+
136
+ <li><a href="#matte">matte</a></li>
137
+
138
+ <li><a href="#opacity">opacity</a></li>
139
+
140
+ <li><a href="#path">path</a></li>
141
+
142
+ <li><a href="#pattern">pattern</a></li>
143
+
144
+ <li><a href="#point">point</a></li>
145
+
146
+ <li><a href="#pointsize">pointsize</a></li>
147
+
148
+ <li><a href="#polygon">polygon</a></li>
149
+
150
+ <li><a href="#polyline">polyline</a></li>
151
+
152
+ <li><a href="#pop">pop</a></li>
153
+
154
+ <li><a href="#push">push</a></li>
155
+
156
+ <li><a href="#rectangle">rectangle</a></li>
157
+
158
+ <li><a href="#rotate">rotate</a></li>
159
+ </ul>
160
+ </div>
161
+
162
+ <div class="toccol">
163
+ <ul>
164
+ <li><a href="#roundrectangle">roundrectangle</a></li>
165
+
166
+ <li><a href="#scale">scale</a></li>
167
+
168
+ <li><a href="#skewx">skewx</a></li>
169
+
170
+ <li><a href="#skewy">skewy</a></li>
171
+
172
+ <li><a href="#stroke">stroke</a></li>
173
+
174
+ <li><a href="#stroke_antialias">stroke_antialias</a></li>
175
+
176
+ <li><a href="#stroke_dasharray">stroke_dasharray</a></li>
177
+
178
+ <li><a href="#stroke_dashoffset">stroke_dashoffset</a></li>
179
+
180
+ <li><a href="#stroke_linecap">stroke_linecap</a></li>
181
+
182
+ <li><a href="#stroke_linejoin">stroke_linejoin</a></li>
183
+
184
+ <li><a href="#stroke_miterlimit">stroke_miterlimit</a></li>
185
+
186
+ <li><a href="#stroke_opacity">stroke_opacity</a></li>
187
+
188
+ <li><a href="#stroke_width">stroke_width</a></li>
189
+
190
+ <li><a href="#text">text</a></li>
191
+
192
+ <li><a href="#text_align">text_align</a></li>
193
+
194
+ <li><a href="#text_anchor">text_anchor</a></li>
195
+
196
+ <li><a href="#text_antialias">text_antialias</a></li>
197
+
198
+ <li><a href="#text_undercolor">text_undercolor</a></li>
199
+
200
+ <li><a href="#translate">translate</a></li>
201
+ </ul>
202
+ </div>
203
+
204
+ <h3>annotate attributes</h3>
205
+
206
+ <div class="toccol">
207
+ <ul>
208
+ <li><a href="#affine_eq">affine</a></li>
209
+
210
+ <li><a href="#align_eq">align</a></li>
211
+
212
+ <li><a href="#decorate_eq">decorate</a></li>
213
+
214
+ <li><a href="#density_eq">density</a></li>
215
+
216
+ <li><a href="#encoding_eq">encoding</a></li>
217
+
218
+ <li><a href="#fill_eq">fill</a></li>
219
+
220
+ <li><a href="#fill_pattern_eq">fill_pattern</a></li>
221
+
222
+ <li><a href="#font_eq">font</a></li>
223
+ </ul>
224
+ </div>
225
+
226
+ <div class="toccol">
227
+ <ul>
228
+ <li><a href="#font_family_eq">font_family</a></li>
229
+
230
+ <li><a href="#font_stretch_eq">font_stretch</a></li>
231
+
232
+ <li><a href="#font_style_eq">font_style</a></li>
233
+
234
+ <li><a href="#font_weight_eq">font_weight</a></li>
235
+
236
+ <li><a href="#gravity_eq">gravity</a></li>
237
+
238
+ <li><a href=
239
+ "#interline_spacing_eq">interline_spacing</a></li>
240
+
241
+ <li><a href=
242
+ "#interword_spacing_eq">interword_spacing</a></li>
243
+
244
+ <li><a href="#kerning_eq">kerning</a></li>
245
+ </ul>
246
+ </div>
247
+
248
+ <div class="toccol">
249
+ <ul>
250
+ <li><a href="#pointsize_eq">pointsize</a></li>
251
+
252
+ <li><a href="#rotation_eq">rotation</a></li>
253
+
254
+ <li><a href="#stroke_eq">stroke</a></li>
255
+
256
+ <li><a href="#stroke_pattern_eq">stroke_pattern</a></li>
257
+
258
+ <li><a href="#stroke_width_eq">stroke_width</a></li>
259
+
260
+ <li><a href="#text_antialias_eq">text_antialias</a></li>
261
+
262
+ <li><a href="#tile_eq">tile</a></li>
263
+
264
+ <li><a href="#undercolor_eq">undercolor</a></li>
265
+ </ul>
266
+ </div>
267
+ </div>
268
+
269
+ <h2 class="methods">class methods</h2>
270
+
271
+ <div class="sig">
272
+ <h3 id="new">new</h3>
273
+
274
+ <p>Draw.new <span class="arg">[&nbsp;{ optional parameters
275
+ }&nbsp;]</span> -&gt; <em>draw</em></p>
276
+ </div>
277
+
278
+ <div class="desc">
279
+ <h4>Description</h4>
280
+
281
+ <p>Creates a new Draw object.</p>
282
+
283
+ <h4>Arguments</h4>
284
+
285
+ <p>If you plan to use the <code>annotate</code> method with
286
+ this object you can initialize the <a href=
287
+ "#attributes">attributes</a> in the associated block.</p>
288
+
289
+ <h4>Returns</h4>A new <code>Draw</code> object.
290
+
291
+ <h4>Example</h4>
292
+ <pre>
293
+ gc = Draw.new
294
+ </pre>
295
+ </div>
296
+
297
+ <h2 class="methods">instance methods</h2>
298
+
299
+ <div class="sig">
300
+ <h3 id="annotate">annotate</h3>
301
+
302
+ <p><span class="arg">draw.</span>annotate(<span class=
303
+ "arg">img</span>, <span class="arg">width</span>, <span class=
304
+ "arg">height</span>, <span class="arg">x</span>, <span class=
305
+ "arg">y</span>, <span class="arg">text</span>) <span class=
306
+ "arg">[&nbsp;{ additional parameters }&nbsp;]</span> -&gt;
307
+ <em>self</em></p>
308
+ </div>
309
+
310
+ <div class="desc">
311
+ <h4>Description</h4>
312
+
313
+ <p>Annotates a image with text. The text is positioned
314
+ according to the <code>gravity</code> attribute around the
315
+ rectangle described by the <span class="arg">x</span>,
316
+ <span class="arg">y</span>, <span class="arg">width</span>, and
317
+ <span class="arg">height</span> arguments. If either of the
318
+ <span class="arg">width</span> or <span class=
319
+ "arg">height</span> arguments are 0, uses the image
320
+ width-<span class="arg">x</span> and the image
321
+ height-<span class="arg">y</span> to compute the rectangle
322
+ width and height. The attributes described in <a href=
323
+ "#attributes">annotate attributes</a>, below, influence the
324
+ appearance and position of the text. These attributes may be
325
+ set in the Draw object before calling <code>annotate</code>, or
326
+ within <code>annotate</code>'s optional <span class=
327
+ "arg">additional parameters</span> block.</p>
328
+
329
+ <p><em>Note</em>: all of the <code>annotate</code> attributes
330
+ are set-only.</p>
331
+
332
+ <h4>Arguments</h4>
333
+
334
+ <dl>
335
+ <dt>img</dt>
336
+
337
+ <dd>the image or imagelist to be annotated</dd>
338
+
339
+ <dt>width</dt>
340
+
341
+ <dd>width of the rectangle within which the text is
342
+ positioned</dd>
343
+
344
+ <dt>height</dt>
345
+
346
+ <dd>height of the rectangle within which the text is
347
+ positioned</dd>
348
+
349
+ <dt>x</dt>
350
+
351
+ <dd>x offset of the rectangle</dd>
352
+
353
+ <dt>y</dt>
354
+
355
+ <dd>y offset of the rectangle</dd>
356
+
357
+ <dt>text</dt>
358
+
359
+ <dd>the text</dd>
360
+ </dl>
361
+
362
+ <h4>Returns</h4>
363
+
364
+ <p>self</p>
365
+
366
+ <h4>Example</h4>
367
+
368
+ <p>This example is an excerpt of <a href=
369
+ "javascript:popup('colors.rb.html')" title=
370
+ "Click to see the example script">colors.rb</a>. Many other
371
+ examples also use <code>annotate</code>.</p>
372
+ <pre>
373
+ title.annotate(montage, 0,0,0,40, 'Named Colors') {
374
+ self.font_family = 'Helvetica'
375
+ self.fill = 'white'
376
+ self.stroke = 'transparent'
377
+ self.pointsize = 32
378
+ self.font_weight = BoldWeight
379
+ self.gravity = NorthGravity
380
+ }
381
+ </pre>
382
+
383
+ <h4>Special characters</h4>
384
+
385
+ <p>Escape a blank, quote, or apostrophe by preceding it with a
386
+ backslash ("\"). To include a backslash in the text, use two
387
+ consecutive backslashes. To include a '%' in the text, use
388
+ '%%'. You can include information about the image by including
389
+ one or more of the special character sequences shown in this
390
+ table.</p>
391
+
392
+ <table id="spec_chars_table" summary=
393
+ "annotate special characters" class="simple_table">
394
+ <caption>
395
+ Special characters
396
+ </caption>
397
+
398
+ <tr>
399
+ <th>Replaced by</th>
400
+
401
+ <th>&nbsp;</th>
402
+ </tr>
403
+
404
+ <tr>
405
+ <td>%b</td>
406
+
407
+ <td>file size in bytes</td>
408
+ </tr>
409
+
410
+ <tr>
411
+ <td>%c</td>
412
+
413
+ <td>"comment" property string</td>
414
+ </tr>
415
+
416
+ <tr>
417
+ <td>%d</td>
418
+
419
+ <td>directory in which the file resides</td>
420
+ </tr>
421
+
422
+ <tr>
423
+ <td>%e</td>
424
+
425
+ <td>filename extension</td>
426
+ </tr>
427
+
428
+ <tr>
429
+ <td>%f</td>
430
+
431
+ <td>original filename</td>
432
+ </tr>
433
+
434
+ <tr>
435
+ <td>%g</td>
436
+
437
+ <td>group number</td>
438
+ </tr>
439
+
440
+ <tr>
441
+ <td>%h</td>
442
+
443
+ <td>height</td>
444
+ </tr>
445
+
446
+ <tr>
447
+ <td>%i</td>
448
+
449
+ <td>current filename</td>
450
+ </tr>
451
+
452
+ <tr>
453
+ <td>%k</td>
454
+
455
+ <td>number of unique colors</td>
456
+ </tr>
457
+
458
+ <tr>
459
+ <td>%l</td>
460
+
461
+ <td>"label" property string</td>
462
+ </tr>
463
+
464
+ <tr>
465
+ <td>%m</td>
466
+
467
+ <td>file format</td>
468
+ </tr>
469
+
470
+ <tr>
471
+ <td>%n</td>
472
+
473
+ <td>number of images in the sequence (for RMagick, this is
474
+ always 1)</td>
475
+ </tr>
476
+
477
+ <tr>
478
+ <td>%o</td>
479
+
480
+ <td>output filename</td>
481
+ </tr>
482
+
483
+ <tr>
484
+ <td>%p</td>
485
+
486
+ <td>page number (for RMagick, this is always 1)</td>
487
+ </tr>
488
+
489
+ <tr>
490
+ <td>%q</td>
491
+
492
+ <td>depth</td>
493
+ </tr>
494
+
495
+ <tr>
496
+ <td>%r</td>
497
+
498
+ <td>A string of the form "ClasstypeColorspace," for example
499
+ "DirectClassRGB". If the image's <em>matte</em> attribute
500
+ is <code>true</code>, appends the word "Matte" to the end
501
+ of the string.</td>
502
+ </tr>
503
+
504
+ <tr>
505
+ <td>%s</td>
506
+
507
+ <td>scene number (always 1)</td>
508
+ </tr>
509
+
510
+ <tr>
511
+ <td>%t</td>
512
+
513
+ <td>filename without extension</td>
514
+ </tr>
515
+
516
+ <tr>
517
+ <td>%u</td>
518
+
519
+ <td>unique temporary filename</td>
520
+ </tr>
521
+
522
+ <tr>
523
+ <td>%w</td>
524
+
525
+ <td>width</td>
526
+ </tr>
527
+
528
+ <tr>
529
+ <td>%x</td>
530
+
531
+ <td>x resolution</td>
532
+ </tr>
533
+
534
+ <tr>
535
+ <td>%y</td>
536
+
537
+ <td>y resolution</td>
538
+ </tr>
539
+
540
+ <tr>
541
+ <td>%z</td>
542
+
543
+ <td>depth</td>
544
+ </tr>
545
+ </table>
546
+
547
+ <h4>See also</h4>
548
+
549
+ <p>This method is also defined in the <a href=
550
+ "image1.html#annotate">Image</a> class.</p>
551
+
552
+ <h4>Magick API</h4>
553
+
554
+ <p>AnnotateImage</p>
555
+ </div>
556
+
557
+ <div class="sig">
558
+ <h3 id="clone">clone</h3>
559
+
560
+ <p><span class="arg">draw</span>.clone -&gt;
561
+ <em>other_draw</em></p>
562
+ </div>
563
+
564
+ <div class="desc">
565
+ <h4>Description</h4>
566
+
567
+ <p>Same as <a href="#dup">dup</a> except the frozen state of
568
+ the original is propagated to the copy.</p>
569
+
570
+ <h4>Returns</h4>
571
+
572
+ <p>A new Draw object.</p>
573
+ </div>
574
+
575
+ <div class="sig">
576
+ <h3 id="draw">draw</h3>
577
+
578
+ <p><span class="arg">draw</span>.draw(<span class=
579
+ "arg">img</span>) -&gt; <em>self</em></p>
580
+ </div>
581
+
582
+ <div class="desc">
583
+ <h4>Description</h4>
584
+
585
+ <p>Draws the list of graphic primitives on the specified image.
586
+ Calling <code>draw</code> does not affect the list of
587
+ primitives. Each time you call <code>draw</code> the primitives
588
+ will be re-executed from the beginning.</p>
589
+
590
+ <h4>Arguments</h4>
591
+
592
+ <p>Either an imagelist or a image. If an imagelist, draws on
593
+ the current image.</p>
594
+
595
+ <h4>Returns</h4>
596
+
597
+ <p>self</p>
598
+
599
+ <h4>Example</h4>
600
+
601
+ <p>See the other examples on this page.</p>
602
+
603
+ <h4>Magick API</h4>
604
+
605
+ <p>DrawImage</p>
606
+ </div>
607
+
608
+ <div class="sig">
609
+ <h3 id="dup">dup</h3>
610
+
611
+ <p><span class="arg">draw</span>.dup -&gt;
612
+ <em>other_draw</em></p>
613
+ </div>
614
+
615
+ <div class="desc">
616
+ <h4>Description</h4>
617
+
618
+ <p>Duplicate a <code>Draw</code> object.</p>
619
+
620
+ <h4>Returns</h4>
621
+
622
+ <p>An exact copy of the receiver, including the list of drawing
623
+ primitives.</p>
624
+
625
+ <h4>See also</h4>
626
+
627
+ <p><a href="#clone">clone</a></p>
628
+ </div>
629
+
630
+ <div class="sig">
631
+ <h3 id="get_multiline_type_metrics">
632
+ get_multiline_type_metrics</h3>
633
+
634
+ <p><span class=
635
+ "arg">draw</span>.get_multiline_type_metrics([<span class=
636
+ "arg">image</span>,] <span class="arg">string</span>) -&gt;
637
+ <em>type_metrics</em></p>
638
+ </div>
639
+
640
+ <div class="sig">
641
+ <h3 id="get_type_metrics">get_type_metrics</h3>
642
+
643
+ <p><span class="arg">draw</span>.get_type_metrics([<span class=
644
+ "arg">image</span>,] <span class="arg">string</span>) -&gt;
645
+ <em>type_metrics</em></p>
646
+ </div>
647
+
648
+ <div class="desc">
649
+ <h4>Description</h4>
650
+
651
+ <p>Returns information for a specific string if rendered on a
652
+ image. The <code>get_multiline_type_metrics</code> method is
653
+ the same as <code>get_type_metrics</code>, except the former
654
+ returns the maximum height and width for multiple lines of
655
+ text. (Text lines are separated by "\n" characters.)</p>
656
+
657
+ <p>The Magick++ documentation for its TypeMetric class provides
658
+ this useful additional information. (I've changed it a bit to
659
+ use RMagick names.)</p>
660
+
661
+ <blockquote>
662
+ <p class="imquote">The TypeMetric class provides the means to
663
+ pass data from the Draw class's get_type_metric method to the
664
+ user. It provides information regarding font metrics such as
665
+ ascent, descent, text width, text height, and maximum
666
+ horizontal advance. The units of these font metrics are in
667
+ pixels...(T)he metrics are dependent on the current Image
668
+ font (default Ghostscript's "Helvetica"), pointsize (default
669
+ 12 points), and x/y resolution (default 72 DPI) settings.</p>
670
+
671
+ <p class="imquote">The pixel units may be converted to points
672
+ (the standard resolution-independent measure used by the
673
+ typesetting industry) via the following equation:</p>
674
+
675
+ <p><code>size_points = (size_pixels *
676
+ 72)/resolution</code></p>
677
+
678
+ <p class="imquote">where resolution is in dots-per-inch
679
+ (DPI). This means that at the default image resolution, there
680
+ is one pixel per point.</p>
681
+
682
+ <p class="imquote">Note that a font's pointsize is only a
683
+ first-order approximation of the font height (ascender +
684
+ descender) in points. The relationship between the specified
685
+ pointsize and the rendered font height is determined by the
686
+ font designer.</p>
687
+
688
+ <p class="imquote">See <a href=
689
+ "http://freetype.sourceforge.net/freetype2/docs/glyphs/index.html">
690
+ FreeType Glyph Conventions</a> for a detailed description of
691
+ font metrics related issues.</p>
692
+ </blockquote>
693
+
694
+ <h4>Arguments</h4>
695
+
696
+ <dl>
697
+ <dt>image <em>(optional)</em></dt>
698
+
699
+ <dd>The image on which the string will be rendered.
700
+ ImageMagick uses the attributes of the image (font name,
701
+ pointsize, etc.) to compute the metrics. If this argument is
702
+ omitted, <code>get_type_metrics</code> substitutes a dummy
703
+ image with default attributes. The <span class=
704
+ "arg">string</span> argument may not contain any of the
705
+ special characters shown in <a href=
706
+ "#spec_chars_table">this</a> table.</dd>
707
+
708
+ <dt>string</dt>
709
+
710
+ <dd>The string to be rendered. If <span class=
711
+ "arg">img</span> is specified, the string may contain special
712
+ characters that refer to the image attributes. See <a href=
713
+ "#spec_chars_table">this</a> table.</dd>
714
+ </dl>
715
+
716
+ <h4>Returns</h4>
717
+
718
+ <p>A TypeMetric struct. This structure has the following
719
+ attributes. (The descriptions are taken from the <a href=
720
+ "http://www.imagemagick.org/Magick++/TypeMetric.html">Magick++</a>
721
+ documentation and source code.)</p>
722
+
723
+ <table summary="type metric attributes" class="simple_table">
724
+ <caption>
725
+ TypeMetric attributes
726
+ </caption>
727
+
728
+ <tr>
729
+ <th>Accessor</th>
730
+
731
+ <th>Description</th>
732
+ </tr>
733
+
734
+ <tr>
735
+ <td>ascent</td>
736
+
737
+ <td>Distance in pixels from the text baseline to the
738
+ highest/upper grid coordinate used to place an outline
739
+ point. Always a positive value.</td>
740
+ </tr>
741
+
742
+ <tr>
743
+ <td>descent</td>
744
+
745
+ <td>Distance in pixels from the baseline to the lowest grid
746
+ coordinate used to place an outline point. Always a
747
+ negative value.</td>
748
+ </tr>
749
+
750
+ <tr>
751
+ <td>width</td>
752
+
753
+ <td>Text width in pixels</td>
754
+ </tr>
755
+
756
+ <tr>
757
+ <td>height</td>
758
+
759
+ <td>Text height in pixels</td>
760
+ </tr>
761
+
762
+ <tr>
763
+ <td>max_advance</td>
764
+
765
+ <td>Maximum horizontal advance (advance from the beginning
766
+ of a character to the beginning of the next character) in
767
+ pixels.</td>
768
+ </tr>
769
+ </table>
770
+
771
+ <h4>Example</h4>
772
+
773
+ <p>This example shows the details of a TypeMetric struct.
774
+ <a href="javascript:popup('get_type_metrics.rb.html')" title=
775
+ "Click to see the example script"><img src=
776
+ "ex/get_type_metrics.gif" alt=
777
+ "get_type_metrics example" /></a></p>
778
+
779
+ <p>This example uses the <code>width</code> and
780
+ <code>height</code> values returned by
781
+ <code>get_multiline_type_metrics</code> to draw a border around
782
+ the text lines. <a href=
783
+ "javascript:popup('get_multiline_type_metrics.rb.html')" title=
784
+ "Click to see the example script"><img src=
785
+ "ex/get_multiline_type_metrics.gif" alt=
786
+ "get_multiline_type_metrics example" /></a></p>
787
+
788
+ <h4>Magick API</h4>
789
+
790
+ <p>GetTypeMetrics, GetMultilineTypeMetrics</p>
791
+ </div>
792
+
793
+ <div class="sig">
794
+ <h3 id="inspect">inspect</h3>
795
+
796
+ <p><span class="arg">draw</span>.inspect -&gt;
797
+ <em>string</em></p>
798
+ </div>
799
+
800
+ <div class="desc">
801
+ <h4>Description</h4>
802
+
803
+ <p>Returns the list of primitives that have been added to the
804
+ <code>draw</code> object. This is very handy for debugging.</p>
805
+
806
+ <h4>Example</h4>
807
+ <pre>
808
+ draw.inspect &raquo;
809
+ "stroke red
810
+ fill transparent
811
+ rectangle 20,20 380,180
812
+ line 200,20 200,180
813
+ line 20,100 380,100
814
+ stroke transparent
815
+ fill black"
816
+ </pre>
817
+ </div>
818
+
819
+ <h2 class="methods">drawing primitive methods</h2>
820
+
821
+ <div class="sig">
822
+ <h3 id="affine">affine</h3>
823
+
824
+ <p><span class="arg">draw</span>.affine(<span class="arg">sx,
825
+ rx, ry, sy, tx, ty</span>) -&gt; <em>self</em></p>
826
+ </div>
827
+
828
+ <div class="desc">
829
+ <h4>Description</h4>
830
+
831
+ <p>Transforms the coordinate system by a 3x3 transformation
832
+ matrix. See <a href=
833
+ "http://www.w3.org/TR/SVG/coords.html#EstablishingANewUserSpace">
834
+ Coordinate system transformations</a> in the <cite>Scalable
835
+ Vector Graphics (SVG) 1.1 Specification</cite>.</p>
836
+
837
+ <h4>Arguments</h4>
838
+
839
+ <dl>
840
+ <dt>sx, sy</dt>
841
+
842
+ <dd>The amount of scaling in the <em>x</em> and <em>y</em>
843
+ directions</dd>
844
+
845
+ <dt>rx, ry</dt>
846
+
847
+ <dd>The rotation in the <em>x</em> and <em>y</em> directions,
848
+ in radians</dd>
849
+
850
+ <dt>tx, ty</dt>
851
+
852
+ <dd>The translation distances in the <em>x</em> and
853
+ <em>y</em> directions, in pixels</dd>
854
+ </dl>
855
+
856
+ <h4>Returns</h4>
857
+
858
+ <p>self</p>
859
+
860
+ <h4>Example</h4>
861
+
862
+ <p>This example changes the default coordinate system to the
863
+ standard Cartesian coordinate system: the x-axis points
864
+ rightward and the y-axis points up.</p>
865
+
866
+ <p><code>gc.affine(1, 0, 0, -1, 0, max_y)</code></p>
867
+
868
+ <p><a href="javascript:popup('affine.rb.html')" title=
869
+ "Click to see the example script"><img src="ex/affine.gif" alt=
870
+ "affine example" /></a></p>
871
+
872
+ <h4>See also</h4><a href="#rotate">rotate</a>, <a href=
873
+ "#scale">scale</a>, <a href="#translate">translate</a>
874
+ </div>
875
+
876
+ <div class="sig">
877
+ <h3 id="arc">arc</h3>
878
+
879
+ <p><span class="arg">draw</span>.arc(<span class="arg">start_x,
880
+ start_y, end_x, end_y, start_degrees, end_degrees</span>) -&gt;
881
+ <em>self</em></p>
882
+ </div>
883
+
884
+ <div class="desc">
885
+ <h4>Description</h4>
886
+
887
+ <p>Draws an arc within a rectangle.</p>
888
+
889
+ <h4>Arguments</h4>
890
+
891
+ <dl>
892
+ <dt>start_x, start_y</dt>
893
+
894
+ <dd>one corner of the bounding rectangle</dd>
895
+
896
+ <dt>end_x, end_y</dt>
897
+
898
+ <dd>the opposite corner of the bounding rectangle</dd>
899
+
900
+ <dt>start_degrees</dt>
901
+
902
+ <dd>where to start drawing the arc</dd>
903
+
904
+ <dt>end_degrees</dt>
905
+
906
+ <dd>where the arc ends</dd>
907
+ </dl>
908
+
909
+ <h4>Returns</h4>
910
+
911
+ <p>self</p>
912
+
913
+ <h4>Example</h4>
914
+
915
+ <p><code>gc.arc(40, 50, 250, 180, 0, 270)</code></p>
916
+
917
+ <p><a href="javascript:popup('arc.rb.html')" title=
918
+ "Click to see the example script"><img src="ex/arc.gif" alt=
919
+ "arc example" /></a></p>
920
+
921
+ <h4>See also</h4><a href="#ellipse">ellipse</a>, <a href=
922
+ "#path">the SVG elliptical arc commands (A and a)</a>
923
+ </div>
924
+
925
+ <div class="sig">
926
+ <h3 id="bezier">bezier</h3>
927
+
928
+ <p><span class="arg">draw</span>.bezier(<span class=
929
+ "arg">x1</span>, <span class="arg">y1</span>, <span class=
930
+ "arg">cx1</span>, <span class="arg">cy1</span>, <span class=
931
+ "arg">cx2</span>, <span class="arg">cy2</span>, <span class=
932
+ "arg">x2</span>, <span class="arg">y2</span>...) -&gt;
933
+ <em>self</em></p>
934
+ </div>
935
+
936
+ <div class="desc">
937
+ <h4>Description</h4>
938
+
939
+ <p>Draw a cubic Bezier curve.</p>
940
+
941
+ <h4>Arguments</h4>
942
+
943
+ <p>The arguments are pairs of points. At least 4 pairs must be
944
+ specified. Each point <span class="arg">xn</span>, <span class=
945
+ "arg">yn</span> on the curve is associated with a control point
946
+ <span class="arg">cxn</span>, <span class="arg">cyn</span>. The
947
+ first point, <span class="arg">x1</span>, <span class=
948
+ "arg">y1</span>, is the starting point. The last point,
949
+ <span class="arg">xn</span>, <span class="arg">yn</span>, is
950
+ the ending point. Other point/control point pairs specify
951
+ intermediate points on a polybezier curve.</p>
952
+
953
+ <h4>Returns</h4>
954
+
955
+ <p>self</p>
956
+
957
+ <h4>Examples</h4>
958
+
959
+ <p>The following examples are taken from the <a href=
960
+ "http://www.w3.org/TR/SVG/paths.html">Paths</a> section of the
961
+ <cite>Scalable Vector Graphics (SVG) 1.1
962
+ Specification</cite>.</p>
963
+
964
+ <h4>Example 1</h4>
965
+
966
+ <p><code>gc.bezier(20,120, 20,20, 320,20, 320,120)</code></p>
967
+
968
+ <p><a href="javascript:popup('cbezier1.rb.html')"><img src=
969
+ "ex/cbezier1.gif" alt="bezier example 1" title=
970
+ "Click to see the example script" /></a></p>
971
+
972
+ <h4>Example 2</h4>
973
+
974
+ <p><code>gc.bezier(25,125, 100,25, 400,25, 325,125)</code></p>
975
+
976
+ <p><a href="javascript:popup('cbezier2.rb.html')"><img src=
977
+ "ex/cbezier2.gif" alt="bezier example 2" title=
978
+ "Click to see the example script" /></a></p>
979
+
980
+ <h4>Example 3</h4>
981
+
982
+ <p><code>gc.bezier(100,150, 25,50, 475,50, 400,150)</code></p>
983
+
984
+ <p><a href="javascript:popup('cbezier3.rb.html')"><img src=
985
+ "ex/cbezier3.gif" alt="bezier example 3" title=
986
+ "Click to see the example script" /></a></p>
987
+
988
+ <h4>Example 4</h4>
989
+
990
+ <p><code>gc.bezier(20,180, 20,30, 320,330, 320,180)</code></p>
991
+
992
+ <p><a href="javascript:popup('cbezier4.rb.html')"><img src=
993
+ "ex/cbezier4.gif" alt="bezier example 4" title=
994
+ "Click to see the example script" /></a></p>
995
+
996
+ <h4>Example 5</h4>
997
+
998
+ <p><code>gc.bezier(20,120, 95,20, 245,20, 320,120)</code></p>
999
+
1000
+ <p><a href="javascript:popup('cbezier5.rb.html')"><img src=
1001
+ "ex/cbezier5.gif" alt="bezier example 5" title=
1002
+ "Click to see the example script" /></a></p>
1003
+
1004
+ <h4>Example 6</h4>
1005
+
1006
+ <p><code>gc.bezier(50,150, 50,50, 200,50, 200,150, 200,250,
1007
+ 350,250, 350,150)</code></p>
1008
+
1009
+ <p><a href="javascript:popup('cbezier6.rb.html')"><img src=
1010
+ "ex/cbezier6.gif" alt="bezier example 6" title=
1011
+ "Click to see the example script" /></a></p>
1012
+ </div>
1013
+
1014
+ <div class="sig">
1015
+ <h3 id="circle">circle</h3>
1016
+
1017
+ <p><span class="arg">draw</span>.circle(<span class=
1018
+ "arg">origin_x, origin_y, perim_x, perim_y</span>) -&gt;
1019
+ <em>self</em></p>
1020
+ </div>
1021
+
1022
+ <p>self</p>
1023
+
1024
+ <div class="desc">
1025
+ <h4>Description</h4>
1026
+
1027
+ <p>Draw a circle.</p>
1028
+
1029
+ <h4>Arguments</h4>
1030
+
1031
+ <dl>
1032
+ <dt>origin_x, origin_y</dt>
1033
+
1034
+ <dd>The center of the circle.</dd>
1035
+
1036
+ <dt>perim_x, perim_y</dt>
1037
+
1038
+ <dd>A point on the perimeter of the circle.</dd>
1039
+ </dl>
1040
+
1041
+ <h4>Returns</h4>
1042
+
1043
+ <p>self</p>
1044
+
1045
+ <h4>Example</h4>
1046
+
1047
+ <p><code>gc.circle(125,125, 25,125)</code></p>
1048
+
1049
+ <p><a href="javascript:popup('circle.rb.html')"><img src=
1050
+ "ex/circle.gif" alt="circle example" title=
1051
+ "Click to see the example script" /></a></p>
1052
+ </div>
1053
+
1054
+ <div class="sig">
1055
+ <h3 id="clip_path">clip_path</h3>
1056
+
1057
+ <p><span class="arg">draw</span>.clip_path(<span class=
1058
+ "arg">pathname</span>) -&gt; <em>self</em></p>
1059
+ </div>
1060
+
1061
+ <div class="desc">
1062
+ <h4>Description</h4>
1063
+
1064
+ <p class="imquote">Draws the clip path on the image mask. The
1065
+ clip path defines a clipping area, where only the contained
1066
+ area will be drawn upon. Areas outside of the clipping area are
1067
+ masked.</p>
1068
+
1069
+ <p>Before using a clip-path, you must create it using the
1070
+ <a href="#define_clip_path">define_clip_path</a> method. You
1071
+ must precede <code>clip_path</code> with <a href=
1072
+ "#push">push</a> and terminate the primitives that draw within
1073
+ the clip path with <a href="#pop">pop</a>. For example,</p>
1074
+ <pre>
1075
+ gc.push
1076
+ gc.clip_path('mypath')
1077
+ # drawing primitives within the clip path
1078
+ gc.pop
1079
+ gc.draw
1080
+ </pre>
1081
+
1082
+ <p>Also see the example below.</p>
1083
+
1084
+ <h4>Arguments</h4>
1085
+
1086
+ <p>The name of the clip path.</p>
1087
+
1088
+ <h4>Returns</h4>
1089
+
1090
+ <p>self</p>
1091
+
1092
+ <h4>Example</h4>
1093
+
1094
+ <p>In this example, the picture of the girl is drawn onto the
1095
+ canvas using a star-shaped clipping path.</p>
1096
+
1097
+ <p><a href="javascript:popup('clip_path.rb.html')" id=
1098
+ "clip_path_ex" name="clip_path_ex"><img src="ex/clip_path.gif"
1099
+ alt="clip_path example" title=
1100
+ "Click to see the example script" /></a></p>
1101
+
1102
+ <h4>See also</h4><a href=
1103
+ "#define_clip_path">define_clip_path</a>
1104
+ </div>
1105
+
1106
+ <div class="sig">
1107
+ <h3 id="clip_rule">clip_rule</h3>
1108
+
1109
+ <p><span class=
1110
+ "arg">draw</span>.clip_rule(<code>"evenodd"</code> or
1111
+ <code>"nonzero"</code>) -&gt; <em>self</em></p>
1112
+ </div>
1113
+
1114
+ <div class="desc">
1115
+ <h4>Description</h4>
1116
+
1117
+ <p>Specify how to determine if a point on the image is inside
1118
+ clipping region. See <a href=
1119
+ "http://www.w3.org/TR/SVG/painting.html#FillRuleProperty"><code>
1120
+ the <b>'fill-rule'</b> property</code></a> in the
1121
+ <cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>
1122
+ for a complete description and examples.</p>
1123
+
1124
+ <h4>Arguments</h4>
1125
+
1126
+ <p>Either "evenodd" or "nonzero".</p>
1127
+
1128
+ <h4>Returns</h4>
1129
+
1130
+ <p>self</p>
1131
+ </div>
1132
+
1133
+ <div class="sig">
1134
+ <h3 id="clip_units">clip_units</h3>
1135
+
1136
+ <p><span class=
1137
+ "arg">draw</span>.clip_units(<code>"userSpace"</code>
1138
+ <span class="arg">or</span> <code>"userSpaceOnUse"</code> or
1139
+ <code>"objectSpace"</code>) -&gt; <em>self</em></p>
1140
+ </div>
1141
+
1142
+ <div class="desc">
1143
+ <h4>Description</h4>
1144
+
1145
+ <p>Defines the coordinate space within the clipping region. See
1146
+ <a href=
1147
+ "http://www.w3.org/TR/SVG/masking.html#EstablishingANewClippingPath">
1148
+ Establishing a New Clipping Path</a> in the <cite>Scalable
1149
+ Vector Graphics (SVG) 1.1 Specification</cite> for a complete
1150
+ description and examples.</p>
1151
+
1152
+ <h4>Arguments</h4>
1153
+
1154
+ <p>Either "userSpace", "userSpaceOnUse", or "objectSpace".</p>
1155
+
1156
+ <h4>Returns</h4>
1157
+
1158
+ <p>self</p>
1159
+ </div>
1160
+
1161
+ <div class="sig">
1162
+ <h3 id="color">color</h3>
1163
+
1164
+ <p><span class="arg">draw</span>.color(<span class=
1165
+ "arg">x</span>, <span class="arg">y</span>, <span class=
1166
+ "arg">paint_method</span>) -&gt; <em>self</em></p>
1167
+ </div>
1168
+
1169
+ <div class="desc">
1170
+ <h4>Description</h4>
1171
+
1172
+ <p>Set color in image according to the specified <a href=
1173
+ "constants.html#PaintMethod">PaintMethod</a> constant.</p>
1174
+
1175
+ <h4>Arguments</h4>
1176
+
1177
+ <p>A <a href="constants.html#PaintMethod">PaintMethod</a>
1178
+ constant. If you use the <code>FillToBorderMethod</code>,
1179
+ assign the border color with the
1180
+ <code>Draw#border_color=</code> attribute before calling
1181
+ <a href="#draw">draw</a>.</p>
1182
+
1183
+ <h4>Returns</h4>
1184
+
1185
+ <p>self</p>
1186
+
1187
+ <h4>Example</h4>
1188
+ <pre>
1189
+ draw.border_color = 'black'
1190
+ draw.color(x, y, FillToBorderMethod)
1191
+ </pre>
1192
+
1193
+ <h4>See Also</h4>
1194
+
1195
+ <p><a href="#matte">matte</a></p>
1196
+ </div>
1197
+
1198
+ <div class="sig">
1199
+ <h3 id="composite">composite</h3>
1200
+
1201
+ <p><span class="arg">draw</span>.composite(<span class=
1202
+ "arg">x</span>, <span class="arg">y</span>, <span class=
1203
+ "arg">width</span>, <span class="arg">height</span>,
1204
+ <span class="arg">composite_image</span>, <span class=
1205
+ "arg">op</span>=<code>OverCompositeOp</code>) -&gt;
1206
+ <em>self</em></p>
1207
+ </div>
1208
+
1209
+ <div class="desc">
1210
+ <h4>Description</h4>
1211
+
1212
+ <p>Composite <span class="arg">composite_image</span> with the
1213
+ receiver image.</p>
1214
+
1215
+ <h4>Arguments</h4>
1216
+
1217
+ <dl>
1218
+ <dt>x, y</dt>
1219
+
1220
+ <dd>The offset of <span class="arg">composite_image</span>
1221
+ relative to the receiver image.</dd>
1222
+
1223
+ <dt>width, height</dt>
1224
+
1225
+ <dd>Scale the <span class="arg">composite_image</span> to
1226
+ this size. If either value is 0, <span class=
1227
+ "arg">composite_image</span> is not scaled.</dd>
1228
+
1229
+ <dt>composite_image</dt>
1230
+
1231
+ <dd>Either an imagelist or a image. If an imagelist, uses the
1232
+ current image.</dd>
1233
+
1234
+ <dt>op</dt>
1235
+
1236
+ <dd>A <a href=
1237
+ "constants.html#CompositeOperator">CompositeOperator</a>
1238
+ constant.</dd>
1239
+ </dl>
1240
+
1241
+ <h4>Returns</h4>
1242
+
1243
+ <p>self</p>
1244
+
1245
+ <h4>Example 1</h4>
1246
+
1247
+ <p><a href="javascript:popup('drawcomp.rb.html')"><img src=
1248
+ "ex/drawcomp1.gif" alt="composite example 1" title=
1249
+ "Click to see the example script" /></a></p>
1250
+
1251
+ <h4>Example 2</h4>
1252
+
1253
+ <p><a href="javascript:popup('drawcomp.rb.html')"><img src=
1254
+ "ex/drawcomp2.gif" alt="composite example 2" title=
1255
+ "Click to see the example script" /></a></p>
1256
+
1257
+ <h4>See also</h4>
1258
+
1259
+ <p><a href="image1.html#composite">composite</a></p>
1260
+ </div>
1261
+
1262
+ <div class="sig">
1263
+ <h3 id="decorate">decorate</h3>
1264
+
1265
+ <p><span class="arg">draw</span>.decorate(<span class=
1266
+ "arg">decoration</span>) -&gt; <em>self</em></p>
1267
+ </div>
1268
+
1269
+ <div class="desc">
1270
+ <h4>Description</h4>
1271
+
1272
+ <p>Specify text decoration.</p>
1273
+
1274
+ <h4>Arguments</h4>
1275
+
1276
+ <p>A <a href="constants.html#DecorationType">DecorationType</a>
1277
+ constant.</p>
1278
+
1279
+ <h4>Returns</h4>
1280
+
1281
+ <p>self</p>
1282
+
1283
+ <h4>Example</h4>
1284
+ <pre>
1285
+ draw.decorate(LineThroughDecoration)
1286
+ </pre>
1287
+ </div>
1288
+
1289
+ <div class="sig">
1290
+ <h3 id="define_clip_path">define_clip_path</h3>
1291
+
1292
+ <p><span class="arg">draw</span>.define_clip_path(<span class=
1293
+ "arg">string</span>) { <span class="arg">block</span> } -&gt;
1294
+ <em>self</em></p>
1295
+ </div>
1296
+
1297
+ <div class="desc">
1298
+ <h4>Description</h4>
1299
+
1300
+ <p>Define a clip-path. Within <span class="arg">block</span>,
1301
+ call other drawing primitive methods (<code>rectangle</code>,
1302
+ <code>polygon</code>, <code>text</code>, etc.) to define the
1303
+ clip-path. The union of all the primitives (excluding the
1304
+ effects of rendering methods such as <code>stroke_width</code>,
1305
+ etc.) is the clip-path. After the clip-path is invoked by the
1306
+ <a href="#clip_path">clip-path</a> method, anything drawn on
1307
+ the image inside the clip-path will appear. Anything drawn
1308
+ outside the clip-path will be hidden. (See <a href=
1309
+ "#clip_rule">clip_rule</a> for a definition of how ImageMagick
1310
+ decides what is "inside" and what is "outside" of the
1311
+ clip-path.)</p>
1312
+
1313
+ <h4>Arguments</h4>
1314
+
1315
+ <p>The name of the clip-path. This is the name that is
1316
+ specified in the <code>clip_path</code> method.</p>
1317
+
1318
+ <h4>Returns</h4>
1319
+
1320
+ <p>self</p>
1321
+
1322
+ <h4>Example</h4>See <a href="#clip_path">clip_path</a>.
1323
+ </div>
1324
+
1325
+ <div class="sig">
1326
+ <h3 id="ellipse">ellipse</h3>
1327
+
1328
+ <p>draw.ellipse(<span class="arg">origin_x</span>, <span class=
1329
+ "arg">origin_y</span>, <span class="arg">width</span>,
1330
+ <span class="arg">height</span>, <span class=
1331
+ "arg">arc_start</span>, <span class="arg">arc_end</span>) -&gt;
1332
+ <em>self</em></p>
1333
+ </div>
1334
+
1335
+ <div class="desc">
1336
+ <h4>Description</h4>
1337
+
1338
+ <p>Draw an ellipse.</p>
1339
+
1340
+ <h4>Arguments</h4>
1341
+
1342
+ <dl>
1343
+ <dt>origin_x, origin_y</dt>
1344
+
1345
+ <dd>The center of the ellipse</dd>
1346
+
1347
+ <dt>width, height</dt>
1348
+
1349
+ <dd>The horizontal and vertical radii</dd>
1350
+
1351
+ <dt>arc_start</dt>
1352
+
1353
+ <dd>Where to start the ellipse, in degrees. 0 degrees is at 3
1354
+ o'clock.</dd>
1355
+
1356
+ <dt>arc_end</dt>
1357
+
1358
+ <dd>Where to end the ellipse, in degrees</dd>
1359
+ </dl>
1360
+
1361
+ <h4>Returns</h4>
1362
+
1363
+ <p>self</p>
1364
+
1365
+ <h4>Example</h4>
1366
+
1367
+ <p><code>draw.ellipse(180,125, 150,75, 0, 270)</code></p>
1368
+
1369
+ <p><a href="javascript:popup('ellipse.rb.html')"><img src=
1370
+ "ex/ellipse.gif" alt="ellipse example" title=
1371
+ "Click to see the example script" /></a></p>
1372
+
1373
+ <h4>See also</h4><a href="#arc">arc</a>, <a href=
1374
+ "#circle">circle</a>, <a href="#path">path</a>
1375
+ </div>
1376
+
1377
+ <div class="sig">
1378
+ <h3 id="encoding">encoding</h3>
1379
+
1380
+ <p><span class="arg">draw</span>.encoding(<span class=
1381
+ "arg">string</span>) -&gt; <em>self</em></p>
1382
+ </div>
1383
+
1384
+ <div class="desc">
1385
+ <h4>Description</h4>
1386
+
1387
+ <p>Specify the font encoding.</p>
1388
+
1389
+ <h4>Arguments</h4>
1390
+
1391
+ <p>See the ImageMagick documentation for the
1392
+ <code>-encoding</code> option to the <code>mogrify</code>
1393
+ command</p>
1394
+
1395
+ <h4>Returns</h4>
1396
+
1397
+ <p>self</p>
1398
+ </div>
1399
+
1400
+ <div class="sig">
1401
+ <h3 id="fill">fill</h3>
1402
+
1403
+ <p><span class="arg">draw</span>.fill(<span class=
1404
+ "arg">string</span>) -&gt; <em>self</em></p>
1405
+ </div>
1406
+
1407
+ <div class="desc">
1408
+ <h4>Description</h4>
1409
+
1410
+ <p>Specify the color or pattern with which graphical elements
1411
+ are filled.</p>
1412
+
1413
+ <h4>Arguments</h4>
1414
+
1415
+ <p>A <a href="imusage.html#color_names">color name</a> or
1416
+ <a href="#pattern">pattern</a> name.</p>
1417
+
1418
+ <h4>Returns</h4>
1419
+
1420
+ <p>self</p>
1421
+
1422
+ <h4>Example</h4>
1423
+ <pre>
1424
+ draw.fill('red')
1425
+ </pre>
1426
+
1427
+ <h4>Aliases</h4>
1428
+
1429
+ <p><code>fill_color</code>, <code>fill_pattern</code></p>
1430
+ </div>
1431
+
1432
+ <div class="sig">
1433
+ <h3 id="fill_opacity">fill_opacity</h3>
1434
+
1435
+ <p><span class="arg">draw</span>.fill_opacity(<span class=
1436
+ "arg">float</span> or <em>string</em>) -&gt; <em>self</em></p>
1437
+ </div>
1438
+
1439
+ <div class="desc">
1440
+ <h4>Description</h4>
1441
+
1442
+ <p>Specify the fill opacity.</p>
1443
+
1444
+ <h4>Arguments</h4>
1445
+
1446
+ <p>A number between 0 and 1, inclusive, or a percentage
1447
+ represented as a string, i.e. '30%'. The argument 0.3 is the
1448
+ same as '30%'.</p>
1449
+
1450
+ <h4>Returns</h4>
1451
+
1452
+ <p>self</p>
1453
+
1454
+ <h4>Example</h4>
1455
+
1456
+ <p>See the example for <a href="#opacity">opacity</a>.</p>
1457
+
1458
+ <h4>See also</h4><a href="#opacity">opacity</a>, <a href=
1459
+ "#stroke_opacity">stroke_opacity</a>
1460
+ </div>
1461
+
1462
+ <div class="sig">
1463
+ <h3 id="fill_rule">fill_rule</h3>
1464
+
1465
+ <p><span class=
1466
+ "arg">draw</span>.fill_rule(<code>"evenodd"</code> or
1467
+ <code>"nonzero"</code>) -&gt; <em>self</em></p>
1468
+ </div>
1469
+
1470
+ <div class="desc">
1471
+ <h4>Description</h4>
1472
+
1473
+ <p>Specify how to determine if a point on the image is inside a
1474
+ shape. See <a href=
1475
+ "http://www.w3.org/TR/SVG/painting.html#FillRuleProperty"><code>
1476
+ the <b>'fill-rule'</b> property</code></a> in the
1477
+ <cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>
1478
+ for a complete description and examples.</p>
1479
+
1480
+ <h4>Arguments</h4>
1481
+
1482
+ <p>Either "evenodd" or "nonzero".</p>
1483
+
1484
+ <h4>Returns</h4>
1485
+
1486
+ <p>self</p>
1487
+ </div>
1488
+
1489
+ <div class="sig">
1490
+ <h3 id="font">font</h3>
1491
+
1492
+ <p><span class="arg">draw</span>.font(<span class=
1493
+ "arg">string</span>) -&gt; <em>self</em></p>
1494
+ </div>
1495
+
1496
+ <div class="desc">
1497
+ <h4>Description</h4>
1498
+
1499
+ <p>Specify the font to draw text with.</p>
1500
+
1501
+ <h4>Arguments</h4>
1502
+
1503
+ <p>The font name or filename. <span class="imquote">You can tag
1504
+ a font to specify whether it is a Postscript, Truetype, or
1505
+ OPTION1 font. For example, Arial.ttf is a Truetype font,
1506
+ ps:helvetica is Postscript, and x:fixed is OPTION1.</span></p>
1507
+
1508
+ <p>The font name can be a complete filename such as
1509
+ <code>"/mnt/windows/windows/fonts/Arial.ttf"</code>. The font
1510
+ name can also be a fully qualified X font name such as
1511
+ <code>"-urw-times-medium-i-normal--0-0-0-0-p-0-iso8859-13"</code>.</p>
1512
+
1513
+ <h4>Returns</h4>
1514
+
1515
+ <p>self</p>
1516
+
1517
+ <h4>See also</h4><a href="#font_family">font_family</a>
1518
+ </div>
1519
+
1520
+ <div class="sig">
1521
+ <h3 id="font_family">font_family</h3>
1522
+
1523
+ <p><span class="arg">draw</span>.font_family(<span class=
1524
+ "arg">string</span>) -&gt; <em>self</em></p>
1525
+ </div>
1526
+
1527
+ <div class="desc">
1528
+ <h4>Description</h4>
1529
+
1530
+ <p>Specify the font family.</p>
1531
+
1532
+ <h4>Arguments</h4>
1533
+
1534
+ <p>A font family name such as "arial" or "helvetica".</p>
1535
+
1536
+ <h4>Returns</h4>
1537
+
1538
+ <p>self</p>
1539
+
1540
+ <h4>Example</h4>
1541
+
1542
+ <p>See the example for <a href="#text">text</a>.</p>
1543
+ </div>
1544
+
1545
+ <div class="sig">
1546
+ <h3 id="font_stretch">font_stretch</h3>
1547
+
1548
+ <p><span class="arg">draw</span>.font_stretch(<span class=
1549
+ "arg">stretch</span>) -&gt; <em>self</em></p>
1550
+ </div>
1551
+
1552
+ <div class="desc">
1553
+ <h4>Description</h4>
1554
+
1555
+ <p>Specify the spacing between text characters.</p>
1556
+
1557
+ <h4>Arguments</h4>
1558
+
1559
+ <p>A <a href="constants.html#StretchType">StretchType</a>
1560
+ constant.</p>
1561
+
1562
+ <h4>Returns</h4>
1563
+
1564
+ <p>self</p>
1565
+ </div>
1566
+
1567
+ <div class="sig">
1568
+ <h3 id="font_style">font_style</h3>
1569
+
1570
+ <p><span class="arg">draw</span>.font_style(<span class=
1571
+ "arg">style</span>) -&gt; <em>self</em></p>
1572
+ </div>
1573
+
1574
+ <div class="desc">
1575
+ <h4>Description</h4>
1576
+
1577
+ <p>Specify the font style, i.e. italic, oblique, or normal.</p>
1578
+
1579
+ <h4>Arguments</h4>
1580
+
1581
+ <p>A <a href="constants.html#StyleType">StyleType</a>
1582
+ constant.</p>
1583
+
1584
+ <h4>Returns</h4>
1585
+
1586
+ <p>self</p>
1587
+ </div>
1588
+
1589
+ <div class="sig">
1590
+ <h3 id="font_weight">font_weight</h3>
1591
+
1592
+ <p><span class="arg">draw</span>.font_weight(<span class=
1593
+ "arg">weight</span>) -&gt; <em>self</em></p>
1594
+ </div>
1595
+
1596
+ <div class="desc">
1597
+ <h4>Description</h4>
1598
+
1599
+ <p>Specify the font weight. For example, "bold" or
1600
+ "normal".</p>
1601
+
1602
+ <h4>Arguments</h4>
1603
+
1604
+ <p>A <a href="constants.html#WeightType">WeightType</a>
1605
+ constant, or one of the numbers 100, 200, 300, 400, 500, 600,
1606
+ 700, 800, or 900.</p>
1607
+
1608
+ <h4>Returns</h4>
1609
+
1610
+ <p>self</p>
1611
+ </div>
1612
+
1613
+ <div class="sig">
1614
+ <h3 id="gravity">gravity</h3>
1615
+
1616
+ <p><span class="arg">draw</span>.gravity(<span class=
1617
+ "arg">gravity</span>) -&gt; <em>self</em></p>
1618
+ </div>
1619
+
1620
+ <div class="desc">
1621
+ <h4>Description</h4>
1622
+
1623
+ <p>Specify how the text is positioned. The default is
1624
+ <code>NorthWestGravity</code>.</p>
1625
+
1626
+ <h4>Arguments</h4>
1627
+
1628
+ <p>A <a href="constants.html#GravityType">GravityType</a>
1629
+ constant.</p>
1630
+
1631
+ <h4>Returns</h4>
1632
+
1633
+ <p>self</p>
1634
+
1635
+ <h4>Example</h4>
1636
+
1637
+ <p><a href="javascript:popup('grav.rb.html')"><img src=
1638
+ "ex/grav.gif" alt="gravity example" title=
1639
+ "Click to see the example script" /></a></p>
1640
+
1641
+ <h4>See also</h4>
1642
+
1643
+ <p><a href="#text_align">text_align</a></p>
1644
+ </div>
1645
+
1646
+ <div class="sig">
1647
+ <h3 id="interline_spacing">interline_spacing</h3>
1648
+
1649
+ <p><span class="arg">draw</span>.interline_spacing(<span class=
1650
+ "arg">space</span>) -&gt; <em>self</em></p>
1651
+ </div>
1652
+
1653
+ <div class="desc">
1654
+ <h4>Description</h4>
1655
+
1656
+ <p>Modify the spacing between lines when text has multiple
1657
+ lines.</p>
1658
+
1659
+ <h4>Argument</h4>
1660
+
1661
+ <p>A numeric value. If positive, inserts additional space
1662
+ between lines. If negative, removes space between lines. The
1663
+ amount of space inserted or removed depends on the font.</p>
1664
+
1665
+ <h4>Returns</h4>
1666
+
1667
+ <p>self</p>
1668
+ </div>
1669
+
1670
+ <div class="sig">
1671
+ <h3 id="interword_spacing">interword_spacing</h3>
1672
+
1673
+ <p><span class="arg">draw</span>.interword_spacing(<span class=
1674
+ "arg">space</span>) -&gt; <em>self</em></p>
1675
+ </div>
1676
+
1677
+ <div class="desc">
1678
+ <h4>Description</h4>
1679
+
1680
+ <p>Modify the spacing between words in text.</p>
1681
+
1682
+ <h4>Argument</h4>
1683
+
1684
+ <p>A numeric value. If positive, inserts additional space
1685
+ between words. If negative, removes space between words. The
1686
+ amount of space inserted or removed depends on the font.</p>
1687
+
1688
+ <h4>Returns</h4>
1689
+
1690
+ <p>self</p>
1691
+ </div>
1692
+
1693
+ <div class="sig">
1694
+ <h3 id="kerning">kerning</h3>
1695
+
1696
+ <p><span class="arg">draw</span>.kerning(<span class=
1697
+ "arg">space</span>) -&gt; <em>self</em></p>
1698
+ </div>
1699
+
1700
+ <div class="desc">
1701
+ <h4>Description</h4>
1702
+
1703
+ <p>Modify the spacing between letters in text.</p>
1704
+
1705
+ <h4>Argument</h4>
1706
+
1707
+ <p>A numeric value. If positive, inserts additional space
1708
+ between letters. If negative, removes space between letters.
1709
+ The amount of space inserted or removed depends on the font but
1710
+ is usually measured in pixels. That is, the following call adds
1711
+ <em>about</em> 5 pixels between each letter.</p>
1712
+ <pre>
1713
+ gc.kerning(5)
1714
+ </pre>
1715
+
1716
+ <h4>Returns</h4>
1717
+
1718
+ <p>self</p>
1719
+ </div>
1720
+
1721
+ <div class="sig">
1722
+ <h3 id="line">line</h3>
1723
+
1724
+ <p><span class="arg">draw</span>.line(<span class=
1725
+ "arg">here_x</span>, <span class="arg">here_y</span>,
1726
+ <span class="arg">there_x</span>, <span class=
1727
+ "arg">there_y</span>) -&gt; <em>self</em></p>
1728
+ </div>
1729
+
1730
+ <div class="desc">
1731
+ <h4>Description</h4>
1732
+
1733
+ <p>Draw a line from <em>here</em> to <em>there</em>.</p>
1734
+
1735
+ <h4>Arguments</h4>
1736
+
1737
+ <dl>
1738
+ <dt>here_x, here_y</dt>
1739
+
1740
+ <dd>The starting point.</dd>
1741
+
1742
+ <dt>there_x, there_y</dt>
1743
+
1744
+ <dd>The ending point.</dd>
1745
+ </dl>
1746
+
1747
+ <h4>Returns</h4>
1748
+
1749
+ <p>self</p>
1750
+
1751
+ <h4>Example</h4>
1752
+
1753
+ <p><code>gc.line(50,50, 50,200)<br />
1754
+ gc.line(50,200, 200,200)<br />
1755
+ gc.line(200,200, 50,50)</code></p>
1756
+
1757
+ <p><a href="javascript:popup('line.rb.html')"><img src=
1758
+ "ex/line.gif" alt="line example" title=
1759
+ "Click to see the example script" /></a></p>
1760
+ </div>
1761
+
1762
+ <div class="sig">
1763
+ <h3 id="matte">matte</h3>
1764
+
1765
+ <p><span class="arg">draw</span>.matte(<span class=
1766
+ "arg">x</span>,<span class="arg">y</span>, <span class=
1767
+ "arg">paint_method</span>) -&gt; <em>self</em></p>
1768
+ </div>
1769
+
1770
+ <div class="desc">
1771
+ <h4>Description</h4>
1772
+
1773
+ <p>Make the image transparent according to the specified
1774
+ PaintMethod constant.</p>
1775
+
1776
+ <h4>Arguments</h4>
1777
+
1778
+ <dl>
1779
+ <dt>x, y</dt>
1780
+
1781
+ <dd>Point in image to use, along with the PaintMethod
1782
+ constant, to set transparent pixels in the image.</dd>
1783
+
1784
+ <dt>paint_method</dt>
1785
+
1786
+ <dd>
1787
+ One of the following <a href=
1788
+ "constants.html#PaintMethod">PaintMethod</a> constants:
1789
+
1790
+ <dl>
1791
+ <dt>PointMethod</dt>
1792
+
1793
+ <dd>Make the pixel at <em>(x,y)</em> transparent.</dd>
1794
+
1795
+ <dt>ReplaceMethod</dt>
1796
+
1797
+ <dd>Make all pixels that are the same color as the pixel
1798
+ at <em>(x,y)</em> transparent.</dd>
1799
+
1800
+ <dt>FloodfillMethod</dt>
1801
+
1802
+ <dd>Make all the pixels surrounding the pixel at
1803
+ <em>(x,y)</em> transparent, until encountering pixels
1804
+ that fail to match color at <em>(x,y)</em>.</dd>
1805
+
1806
+ <dt>FillToBorderMethod</dt>
1807
+
1808
+ <dd>Make all the pixels surrounding the pixel at
1809
+ <em>(x,y)</em> transparent, until encountering pixels
1810
+ that match the border color. Assign the border color with
1811
+ the <code>Draw#border_color=</code> attribute before
1812
+ calling <a href="#draw">draw</a>.</dd>
1813
+
1814
+ <dt>ResetMethod</dt>
1815
+
1816
+ <dd>Make the entire image transparent.</dd>
1817
+ </dl>
1818
+ </dd>
1819
+ </dl>
1820
+
1821
+ <h4>Returns</h4>
1822
+
1823
+ <p>self</p>
1824
+
1825
+ <h4>See also</h4><a href="#color">color</a><a href=
1826
+ "image2.html#matte_point">matte_point</a>, <a href=
1827
+ "image2.html#matte_replace">matte_replace</a>, <a href=
1828
+ "image2.html#matte_floodfill">matte_floodfill</a>, <a href=
1829
+ "image2.html#matte_fill_to_border">matte_fill_to_border</a>,
1830
+ <a href="image2.html#opaque">opaque</a>, <a href=
1831
+ "image3.html#transparent">transparent</a>
1832
+ </div>
1833
+
1834
+ <div class="sig">
1835
+ <h3 id="opacity">opacity</h3>
1836
+
1837
+ <p><span class="arg">draw</span>.opacity(<span class=
1838
+ "arg">opacity</span>) -&gt; <em>self</em></p>
1839
+ </div>
1840
+
1841
+ <div class="desc">
1842
+ <h4>Description</h4>
1843
+
1844
+ <p>Specify the fill and stroke opacities.</p>
1845
+
1846
+ <h4>Arguments</h4>
1847
+
1848
+ <p>Either a number between 0 and 1, or a percentage represented
1849
+ as a string, i.e. "25%". The string argument "25%" is the same
1850
+ as the numeric argument 0.25. Both the fill and stroke
1851
+ opacities are set to the specified value.</p>
1852
+
1853
+ <h4>Returns</h4>
1854
+
1855
+ <p>self</p>
1856
+
1857
+ <h4>Example</h4>
1858
+
1859
+ <p>This example demonstrates 4 levels of opacity.</p>
1860
+
1861
+ <p><a href="javascript:popup('opacity.rb.html')"><img src=
1862
+ "ex/opacity.png" alt="opacity example" title=
1863
+ "Click to see the example script" /></a></p>
1864
+
1865
+ <h4>See also</h4>
1866
+
1867
+ <p><a href="#fill_opacity">fill_opacity</a>, <a href=
1868
+ "#stroke_opacity">stroke_opacity</a></p>
1869
+ </div>
1870
+
1871
+ <div class="sig">
1872
+ <h3 id="path">path</h3>
1873
+
1874
+ <p><span class="arg">draw</span>.path(<span class=
1875
+ "arg">string</span>) -&gt; <em>self</em></p>
1876
+ </div>
1877
+
1878
+ <div class="desc">
1879
+ <h4>Description</h4>
1880
+
1881
+ <p>Draw using SVG-compatible path drawing commands. See
1882
+ "<a href="http://www.w3.org/TR/SVG/paths.html">Paths</a>" in
1883
+ the <cite>Scalable Vector Graphics (SVG) 1.1
1884
+ Specification</cite>.</p>
1885
+
1886
+ <h4>Arguments</h4>
1887
+
1888
+ <p>A string containing SVG <em>moveto</em>, <em>line</em>,
1889
+ <em>curve</em>, <em>arc</em>, or <em>closepath</em>
1890
+ instructions. The string is equivalent to the
1891
+ <strong>d</strong> attribute in an SVG <strong>'path'</strong>
1892
+ element.</p>
1893
+
1894
+ <h4>Returns</h4>
1895
+
1896
+ <p>self</p>
1897
+
1898
+ <h4>Example</h4>
1899
+
1900
+ <p>These examples are all taken from the <a href=
1901
+ "http://www.w3.org/TR/SVG/paths.html">SVG path</a>
1902
+ examples.</p>
1903
+
1904
+ <h4>Example 1 - Arcs</h4>
1905
+
1906
+ <p><code>gc.path('M110,100 h-75 a75,75 0 1,0 75,-75 z')<br />
1907
+ gc.path('M97.5,87.5 v-75 a75,75 0 0,0 -75,75 z')</code></p>
1908
+
1909
+ <p><a href="javascript:popup('arcpath.rb.html')"><img src=
1910
+ "ex/arcpath.gif" alt="path example 1" title=
1911
+ "Click to see the example script" /></a></p>
1912
+
1913
+ <h4>Example 2 - Quadratic bezier</h4>
1914
+
1915
+ <p><code>gc.path("M20,150 Q120,25 220,150 T420,150")</code></p>
1916
+
1917
+ <p><a href="javascript:popup('qbezierpath.rb.html')"><img src=
1918
+ "ex/qbezierpath.gif" alt="path example 2" title=
1919
+ "Click to see the example script" /></a></p>
1920
+
1921
+ <h4>Example 3 - Cubic bezier</h4>
1922
+
1923
+ <p><code>gc.path("M20,120 C20,20 170,20 170,120 S320,220
1924
+ 320,120")</code></p>
1925
+
1926
+ <p><a href="javascript:popup('path.rb.html')"><img src=
1927
+ "ex/path.gif" alt="path example 3" title=
1928
+ "Click to see the example script" /></a></p>
1929
+ </div>
1930
+
1931
+ <div class="sig">
1932
+ <h3 id="pattern">pattern</h3>
1933
+
1934
+ <p><span class="arg">draw</span>.pattern(<span class=
1935
+ "arg">name</span>, <span class="arg">x</span>, <span class=
1936
+ "arg">y</span>, <span class="arg">width</span>, <span class=
1937
+ "arg">height</span>) { pattern primitives } -&gt;
1938
+ <em>self</em></p>
1939
+ </div>
1940
+
1941
+ <div class="desc">
1942
+ <h4>Description</h4>
1943
+
1944
+ <p>Define a pattern that can be used as the <a href=
1945
+ "#fill">fill</a> or <a href="#stroke">stroke</a> pattern.</p>
1946
+
1947
+ <h4>Arguments</h4>
1948
+
1949
+ <dl>
1950
+ <dt>name</dt>
1951
+
1952
+ <dd>The name of the pattern. The pattern is used in a
1953
+ <a href="#fill">fill</a> or <a href="#stroke">stroke</a>
1954
+ method by specifying its name.</dd>
1955
+
1956
+ <dt>x, y, width, height</dt>
1957
+
1958
+ <dd>Define how the pattern is tiled. The pattern rectangles
1959
+ start at (<span class="arg">x</span> +
1960
+ <em>m</em>*<span class="arg">width</span>, <span class=
1961
+ "arg">y</span>+<em>n</em>*<span class="arg">height</span>)
1962
+ for the values of <em>n</em> and <em>m</em> as necessary to
1963
+ fill the space.</dd>
1964
+
1965
+ <dt>pattern primitives</dt>
1966
+
1967
+ <dd>The method calls that draw the pattern.</dd>
1968
+ </dl>
1969
+
1970
+ <h4>Returns</h4>
1971
+
1972
+ <p>self</p>
1973
+
1974
+ <h4>Example 1</h4>
1975
+
1976
+ <p><a href="javascript:popup('pattern1.rb.html')"><img src=
1977
+ "ex/pattern1.gif" alt="pattern example 1" title=
1978
+ "Click to see the example script" /></a></p>
1979
+
1980
+ <h4>Example 2</h4>
1981
+
1982
+ <p><a href="javascript:popup('pattern2.rb.html')"><img src=
1983
+ "ex/pattern2.gif" alt="pattern example 2" title=
1984
+ "Click to see the example script" /></a></p>
1985
+
1986
+ <h4>See also</h4>
1987
+
1988
+ <p><a href="#fill">fill</a>, <a href="#stroke">stroke</a></p>
1989
+ </div>
1990
+
1991
+ <div class="sig">
1992
+ <h3 id="point">point</h3>
1993
+
1994
+ <p><span class="arg">draw</span>.point(<span class=
1995
+ "arg">x</span>, <span class="arg">y</span>) -&gt;
1996
+ <em>self</em></p>
1997
+ </div>
1998
+
1999
+ <div class="desc">
2000
+ <h4>Description</h4>
2001
+
2002
+ <p>Set the pixel at <span class="arg">x</span>,<span class=
2003
+ "arg">y</span> to the <a href="#fill">fill</a> color.</p>
2004
+
2005
+ <h4>Arguments</h4>
2006
+
2007
+ <dl>
2008
+ <dt>x, y</dt>
2009
+
2010
+ <dd>The pixel location</dd>
2011
+ </dl>
2012
+
2013
+ <h4>Returns</h4>
2014
+
2015
+ <p>self</p>
2016
+ </div>
2017
+
2018
+ <div class="sig">
2019
+ <h3 id="pointsize">pointsize</h3>
2020
+
2021
+ <p><span class="arg">draw</span>.pointsize(<span class=
2022
+ "arg">integer</span>) -&gt; <em>self</em></p>
2023
+ </div>
2024
+
2025
+ <div class="desc">
2026
+ <h4>Description</h4>
2027
+
2028
+ <p>Set the font size in points. The default is 12.</p>
2029
+
2030
+ <h4>Arguments</h4>
2031
+
2032
+ <p>See the example for <a href="#text">text</a>.</p>
2033
+
2034
+ <h4>Returns</h4>
2035
+
2036
+ <p>self</p>
2037
+
2038
+ <h4>Alias</h4>
2039
+
2040
+ <p>font_size</p>
2041
+ </div>
2042
+
2043
+ <div class="sig">
2044
+ <h3 id="polygon">polygon</h3>
2045
+
2046
+ <p><span class="arg">draw</span>.polygon(<span class=
2047
+ "arg">x1</span>, <span class="arg">y1</span>,...,<span class=
2048
+ "arg">xN</span>, <span class="arg">yN</span>) -&gt;
2049
+ <em>self</em></p>
2050
+ </div>
2051
+
2052
+ <div class="desc">
2053
+ <h4>Description</h4>
2054
+
2055
+ <p>Draw a polygon.</p>
2056
+
2057
+ <h4>Arguments</h4>
2058
+
2059
+ <p>The arguments are a sequence of 2 or more points. If the
2060
+ last point is not the same as the first, the polygon is closed
2061
+ by drawing a line from the last point to the first.</p>
2062
+
2063
+ <h4>Returns</h4>
2064
+
2065
+ <p>self</p>
2066
+
2067
+ <h4>Example</h4>
2068
+
2069
+ <p>This example is taken from the <a href=
2070
+ "http://www.w3.org/TR/SVG/shapes.html#PolygonElement">The
2071
+ 'polygon' element</a> in the <cite>Scalable Vector Graphics
2072
+ (SVG) 1.1 Specification</cite></p><a href=
2073
+ "javascript:popup('polygon.rb.html')"><img src="ex/polygon.gif"
2074
+ alt="polygon example" title=
2075
+ "Click to see the example script" /></a>
2076
+
2077
+ <h4>See also</h4><a href="#path">path</a>
2078
+ </div>
2079
+
2080
+ <div class="sig">
2081
+ <h3 id="polyline">polyline</h3>
2082
+
2083
+ <p><span class="arg">draw</span>.polyline(<span class=
2084
+ "arg">x1</span>, <span class="arg">y1</span>,...,<span class=
2085
+ "arg">xN</span>, <span class="arg">yN</span>) -&gt;
2086
+ <em>self</em></p>
2087
+ </div>
2088
+
2089
+ <div class="desc">
2090
+ <h4>Description</h4>
2091
+
2092
+ <p>Draw a polyline. Unlike a polygon, a polyline is not
2093
+ automatically closed.</p>
2094
+
2095
+ <h4>Arguments</h4>
2096
+
2097
+ <p>A sequence of 2 or more points.</p>
2098
+
2099
+ <h4>Returns</h4>
2100
+
2101
+ <p>self</p>
2102
+
2103
+ <h4>Example</h4>
2104
+
2105
+ <p>This example is taken from the <a href=
2106
+ "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">The
2107
+ 'polyline' element</a> in the <cite>Scalable Vector Graphics
2108
+ (SVG) 1.1 Specification</cite></p>
2109
+
2110
+ <p><a href="javascript:popup('polyline.rb.html')"><img src=
2111
+ "ex/polyline.gif" alt="polyline example" title=
2112
+ "Click to see the example script" /></a></p>
2113
+ </div>
2114
+
2115
+ <div class="sig">
2116
+ <h3 id="pop">pop</h3>
2117
+
2118
+ <p><span class="arg">draw</span>.pop -&gt; <em>self</em></p>
2119
+ </div>
2120
+
2121
+ <div class="desc">
2122
+ <h4>Description</h4>
2123
+
2124
+ <p>Restore the graphics context to the state it was in when
2125
+ <a href="#push">push</a> was called last.</p>
2126
+
2127
+ <h4>Returns</h4>
2128
+
2129
+ <p>self</p>
2130
+
2131
+ <h4>See also</h4><a href="#push">push</a>
2132
+ </div>
2133
+
2134
+ <div class="sig">
2135
+ <h3 id="push">push</h3>
2136
+
2137
+ <p><span class="arg">draw</span>.push -&gt; <em>self</em></p>
2138
+ </div>
2139
+
2140
+ <div class="desc">
2141
+ <h4>Description</h4>
2142
+
2143
+ <p>Save the current state of the graphics context, including
2144
+ the attribute settings and the current set of primitives. Use
2145
+ the <a href="#pop">pop</a> primitive to restore the state.</p>
2146
+
2147
+ <p><em>Note:</em> The <code>push</code> and <code>pop</code>
2148
+ methods are probably not as useful in RMagick as they are in C
2149
+ language ImageMagick programs, since it is easy to create
2150
+ separate draw objects, each with its own set of properties and
2151
+ primitives.</p>
2152
+
2153
+ <h4>Returns</h4>
2154
+
2155
+ <p>self</p>
2156
+
2157
+ <h4>See also</h4><a href="#pop">pop</a>
2158
+ </div>
2159
+
2160
+ <div class="sig">
2161
+ <h3 id="rectangle">rectangle</h3>
2162
+
2163
+ <p><span class="arg">draw</span>.rectangle(<span class=
2164
+ "arg">x1</span>, <span class="arg">y1</span>, <span class=
2165
+ "arg">x2</span>, <span class="arg">y2</span>) -&gt;
2166
+ <em>self</em></p>
2167
+ </div>
2168
+
2169
+ <div class="desc">
2170
+ <h4>Description</h4>
2171
+
2172
+ <p>Draw a rectangle.</p>
2173
+
2174
+ <h4>Arguments</h4>
2175
+
2176
+ <dl>
2177
+ <dt>x1, y1</dt>
2178
+
2179
+ <dd>The upper left hand corner of the rectangle</dd>
2180
+
2181
+ <dt>x2, y2</dt>
2182
+
2183
+ <dd>The lower right hand corner of the rectangle</dd>
2184
+ </dl>
2185
+
2186
+ <h4>Returns</h4>
2187
+
2188
+ <p>self</p>
2189
+
2190
+ <h4>Example</h4>
2191
+
2192
+ <p><code>gc.rectangle(20,20, 280,180)</code></p><a href=
2193
+ "javascript:popup('rectangle.rb.html')"><img src=
2194
+ "ex/rectangle.gif" alt="rectangle example" title=
2195
+ "Click to see the example script" /></a>
2196
+ </div>
2197
+
2198
+ <div class="sig">
2199
+ <h3 id="rotate">rotate</h3>
2200
+
2201
+ <p><span class="arg">draw</span>.rotate(<span class=
2202
+ "arg">degrees</span>) -&gt; <em>self</em></p>
2203
+ </div>
2204
+
2205
+ <div class="desc">
2206
+ <h4>Description</h4>
2207
+
2208
+ <p>Specify a rotation transformation to the coordinate space.
2209
+ The default is 0.</p>
2210
+
2211
+ <h4>Arguments</h4>
2212
+
2213
+ <p>The amount of rotation, in degrees. The angle of rotation is
2214
+ clockwise, so 90&deg; is South.</p>
2215
+
2216
+ <h4>Returns</h4>
2217
+
2218
+ <p>self</p>
2219
+
2220
+ <h4>Example</h4>
2221
+
2222
+ <p><code>gc.rotate(45)</code></p>
2223
+
2224
+ <p><a href="javascript:popup('rotate.rb.html')"><img src=
2225
+ "ex/rotate.gif" alt="rotate example" title=
2226
+ "Click to see the example script" /></a></p>
2227
+
2228
+ <h4>See also</h4><a href="#affine">affine</a>
2229
+ </div>
2230
+
2231
+ <div class="sig">
2232
+ <h3 id="roundrectangle">roundrectangle</h3>
2233
+
2234
+ <p><span class="arg">draw</span>.roundrectangle(<span class=
2235
+ "arg">x1</span>, <span class="arg">y1</span>, <span class=
2236
+ "arg">x2</span>, <span class="arg">y2</span>, <span class=
2237
+ "arg">cw</span>, <span class="arg">ch</span>) -&gt;
2238
+ <em>self</em></p>
2239
+ </div>
2240
+
2241
+ <div class="desc">
2242
+ <h4>Description</h4>
2243
+
2244
+ <p>Draw a rectangle with rounded corners.</p>
2245
+
2246
+ <h4>Arguments</h4>
2247
+
2248
+ <dl>
2249
+ <dt>x1, y1</dt>
2250
+
2251
+ <dd>The upper left hand corner of the rectangle</dd>
2252
+
2253
+ <dt>x2, y2</dt>
2254
+
2255
+ <dd>The lower right hand corner of the rectangle</dd>
2256
+
2257
+ <dt>cw, ch</dt>
2258
+
2259
+ <dd>The corner width and height</dd>
2260
+ </dl>
2261
+
2262
+ <h4>Returns</h4>
2263
+
2264
+ <p>self</p>
2265
+
2266
+ <h4>Example</h4>
2267
+
2268
+ <p><code>gc.roundrectangle(20,20, 280,180, 8, 8)</code></p>
2269
+
2270
+ <p><a href="javascript:popup('roundrect.rb.html')"><img src=
2271
+ "ex/roundrect.gif" alt="roundrectangle example" title=
2272
+ "Click to see the example script" /></a></p>
2273
+ </div>
2274
+
2275
+ <div class="sig">
2276
+ <h3 id="scale">scale</h3>
2277
+
2278
+ <p><span class="arg">draw</span>.scale(<span class=
2279
+ "arg">sx</span>, <span class="arg">sy</span>) -&gt;
2280
+ <em>self</em></p>
2281
+ </div>
2282
+
2283
+ <div class="desc">
2284
+ <h4>Description</h4>
2285
+
2286
+ <p>Define a scale transformation to the coordinate space. The
2287
+ default scale is (1.0, 1.0).</p>
2288
+
2289
+ <h4>Arguments</h4>
2290
+
2291
+ <dl>
2292
+ <dt>sx, sy</dt>
2293
+
2294
+ <dd>The amount of scaling in the x and y dimensions.</dd>
2295
+ </dl>
2296
+
2297
+ <h4>Returns</h4>
2298
+
2299
+ <p>self</p>
2300
+
2301
+ <h4>See also</h4><a href="#affine">affine</a>
2302
+ </div>
2303
+
2304
+ <div class="sig">
2305
+ <h3 id="skewx">skewx</h3>
2306
+
2307
+ <p><span class="arg">draw</span>.skewx(<span class=
2308
+ "arg">float</span>) -&gt; <em>self</em></p>
2309
+ </div>
2310
+
2311
+ <div class="desc">
2312
+ <h4>Description</h4>
2313
+
2314
+ <p>Define a skew transformation along the x-axis.</p>
2315
+
2316
+ <h4>Arguments</h4>
2317
+
2318
+ <p>The amount of skew, in degrees.</p>
2319
+
2320
+ <h4>Returns</h4>
2321
+
2322
+ <p>self</p>
2323
+
2324
+ <h4>Example</h4>
2325
+
2326
+ <p><code>gc.skewx(30)</code></p>
2327
+
2328
+ <p><a href="javascript:popup('skewx.rb.html')"><img src=
2329
+ "ex/skewx.gif" alt="skewx example" title=
2330
+ "Click to see the example script" /></a></p>
2331
+
2332
+ <h4>See also</h4><a href="#skewy">skewy</a>, <a href=
2333
+ "#affine">affine</a>, <a href="#rotate">rotate</a>
2334
+ </div>
2335
+
2336
+ <div class="sig">
2337
+ <h3 id="skewy">skewy</h3>
2338
+
2339
+ <p><span class="arg">draw</span>.skewy(<span class=
2340
+ "arg">float</span>) -&gt; <em>self</em></p>
2341
+ </div>
2342
+
2343
+ <div class="desc">
2344
+ <h4>Description</h4>
2345
+
2346
+ <p>Define a skew transformation along the y-axis.</p>
2347
+
2348
+ <h4>Arguments</h4>
2349
+
2350
+ <p>The amount of skew, in degrees.</p>
2351
+
2352
+ <h4>Returns</h4>
2353
+
2354
+ <p>self</p>
2355
+
2356
+ <h4>Example</h4>
2357
+
2358
+ <p><code>gc.skewy(30)</code></p>
2359
+
2360
+ <p><a href="javascript:popup('skewy.rb.html')"><img src=
2361
+ "ex/skewy.gif" alt="skewy example" title=
2362
+ "Click to see the example script" /></a></p>
2363
+
2364
+ <h4>See also</h4><a href="#affine">affine</a>, <a href=
2365
+ "#skewx">skewx</a>, <a href="#rotate">rotate</a>
2366
+ </div>
2367
+
2368
+ <div class="sig">
2369
+ <h3 id="stroke">stroke</h3>
2370
+
2371
+ <p><span class="arg">draw</span>.stroke(<span class=
2372
+ "arg">string</span>) -&gt; <em>self</em></p>
2373
+ </div>
2374
+
2375
+ <div class="desc">
2376
+ <h4>Description</h4>
2377
+
2378
+ <p>Specify the stroke color or pattern.</p>
2379
+
2380
+ <h4>Arguments</h4>
2381
+
2382
+ <p>A <a href="imusage.html#color_names">color name</a> or
2383
+ <a href="#pattern">pattern</a> name.</p>
2384
+
2385
+ <h4>Returns</h4>
2386
+
2387
+ <p>self</p>
2388
+
2389
+ <h4>Aliases</h4><code>stroke_color</code>,
2390
+ <code>stroke_pattern</code>
2391
+ </div>
2392
+
2393
+ <div class="sig">
2394
+ <h3 id="stroke_antialias">stroke_antialias</h3>
2395
+
2396
+ <p><span class=
2397
+ "arg">draw</span>.stroke_antialias(<code>true</code> or
2398
+ <code>false</code>) -&gt; <em>self</em></p>
2399
+ </div>
2400
+
2401
+ <div class="desc">
2402
+ <h4>Description</h4>
2403
+
2404
+ <p>Specify if the stroke should be antialiased. The default is
2405
+ <code>true</code>.</p>
2406
+ </div>
2407
+
2408
+ <div class="sig">
2409
+ <h3 id="stroke_dasharray">stroke_dasharray</h3>
2410
+
2411
+ <p><span class="arg">draw</span>.stroke_dasharray(<span class=
2412
+ "arg">x1</span>,...,<span class="arg">xn</span>) -&gt;
2413
+ <em>self</em></p>
2414
+ </div>
2415
+
2416
+ <div class="desc">
2417
+ <h4>Description</h4>
2418
+
2419
+ <p>Describe a pattern of dashes to be used when stroking paths.
2420
+ The arguments are a list of pixel widths of alternating dashes
2421
+ and gaps.</p>
2422
+
2423
+ <h4>Arguments</h4>
2424
+
2425
+ <p>The first argument is the width of the first dash. The
2426
+ second is the width of the gap following the first dash. The
2427
+ third argument is another dash width, followed by another gap
2428
+ width, etc. If you specify an odd number of arguments, the
2429
+ arguments are repeated to produce an even number. All arguments
2430
+ must be &gt; 0.</p>
2431
+
2432
+ <p>To produce a solid stroke, specify no arguments, i.e.
2433
+ <code>stroke_dasharray()</code></p>
2434
+
2435
+ <h4>Returns</h4>
2436
+
2437
+ <p>self</p>
2438
+
2439
+ <h4>Example</h4>
2440
+
2441
+ <p><a href=
2442
+ "javascript:popup('stroke_dasharray.rb.html'"><img src=
2443
+ "ex/stroke_dasharray.gif" alt="stroke_dasharray example" title=
2444
+ "Click to see the example script" /></a></p>
2445
+
2446
+ <h4>See also</h4>
2447
+
2448
+ <p><a href="#stroke_dashoffset">stroke_dashoffset</a></p>
2449
+ </div>
2450
+
2451
+ <div class="sig">
2452
+ <h3 id="stroke_dashoffset">stroke_dashoffset</h3>
2453
+
2454
+ <p><span class="arg">draw</span>.stroke_dashoffset(<span class=
2455
+ "arg">integer</span>) -&gt; <em>self</em></p>
2456
+ </div>
2457
+
2458
+ <div class="desc">
2459
+ <h4>Description</h4>
2460
+
2461
+ <p>Specify the initial distance into the dash pattern.</p>
2462
+
2463
+ <h4>Arguments</h4>
2464
+
2465
+ <p>The initial distance into the dash pattern. The units are
2466
+ pixels.</p>
2467
+
2468
+ <h4>Returns</h4>
2469
+
2470
+ <p>self</p>
2471
+
2472
+ <h4>Example</h4>See <a href=
2473
+ "#stroke_dasharray">stroke_dasharray</a>.
2474
+ </div>
2475
+
2476
+ <div class="sig">
2477
+ <h3 id="stroke_linecap">stroke_linecap</h3>
2478
+
2479
+ <p><span class="arg">draw</span>.stroke_linecap(<span class=
2480
+ "arg">string</span>) -&gt; <em>self</em></p>
2481
+ </div>
2482
+
2483
+ <div class="desc">
2484
+ <h4>Description</h4>
2485
+
2486
+ <p>Specify how the line ends should be drawn.</p>
2487
+
2488
+ <h4>Arguments</h4>
2489
+
2490
+ <p>One of "butt", "round", or "square".</p>
2491
+
2492
+ <h4>Returns</h4>
2493
+
2494
+ <p>self</p>
2495
+
2496
+ <h4>Example</h4>
2497
+
2498
+ <p>The following example is from the <a href=
2499
+ "http://www.w3.org/TR/SVG/painting.html#StrokeProperties">Stroke
2500
+ Properties</a> section of the <cite>Scalable Vector Graphics
2501
+ (SVG) 1.1 Specification</cite>.</p>
2502
+
2503
+ <p><a href=
2504
+ "javascript:popup('stroke_linecap.rb.html')"><img src=
2505
+ "ex/stroke_linecap.gif" alt="stroke_linecap example" title=
2506
+ "Click to see the example script" /></a></p>
2507
+ </div>
2508
+
2509
+ <div class="sig">
2510
+ <h3 id="stroke_linejoin">stroke_linejoin</h3>
2511
+
2512
+ <p><span class="arg">draw</span>.stroke_linejoin(<span class=
2513
+ "arg">string</span>) -&gt; <em>self</em></p>
2514
+ </div>
2515
+
2516
+ <div class="desc">
2517
+ <h4>Description</h4>
2518
+
2519
+ <p>Specify how corners are drawn.</p>
2520
+
2521
+ <h4>Arguments</h4>
2522
+
2523
+ <p>One of "miter", "round", or "bevel".</p>
2524
+
2525
+ <h4>Returns</h4>
2526
+
2527
+ <p>self</p>
2528
+
2529
+ <h4>Example</h4>
2530
+
2531
+ <p>The following example is from the <a href=
2532
+ "http://www.w3.org/TR/SVG/painting.html#StrokeProperties">Stroke
2533
+ Properties</a> section of the <cite>Scalable Vector Graphics
2534
+ (SVG) 1.0 Specification</cite>.</p>
2535
+
2536
+ <p><a href=
2537
+ "javascript:popup('stroke_linejoin.rb.html')"><img src=
2538
+ "ex/stroke_linejoin.gif" alt="stroke_linejoin example" title=
2539
+ "Click to see the example script" /></a></p>
2540
+
2541
+ <h4>See also</h4><a href=
2542
+ "#stroke_miterlimit">stroke_miterlimit</a>
2543
+ </div>
2544
+
2545
+ <div class="sig">
2546
+ <h3 id="stroke_miterlimit">stroke_miterlimit</h3>
2547
+
2548
+ <p><span class="arg">draw</span>.stroke_miterlimit(<span class=
2549
+ "arg">float</span>) -&gt; <em>self</em></p>
2550
+ </div>
2551
+
2552
+ <div class="desc">
2553
+ <h4>Description</h4>
2554
+
2555
+ <p>Specify a constraint on the length of the "miter" formed by
2556
+ two lines meeting at an angle. If the angle if very sharp, the
2557
+ miter could be very long relative to the line thickness. The
2558
+ miter limit is a limit on the ratio of the miter length to the
2559
+ line width.</p>
2560
+
2561
+ <h4>Arguments</h4>
2562
+
2563
+ <p>A number &gt;= 1. The limit on the ratio of the miter length
2564
+ to the line width.</p>
2565
+
2566
+ <h4>Returns</h4>
2567
+
2568
+ <p>self</p>
2569
+ </div>
2570
+
2571
+ <div class="sig">
2572
+ <h3 id="stroke_opacity">stroke_opacity</h3>
2573
+
2574
+ <p><span class="arg">draw</span>.stroke_opacity(<span class=
2575
+ "arg">float</span> or <span class="arg">string</span>) -&gt;
2576
+ <em>self</em></p>
2577
+ </div>
2578
+
2579
+ <div class="desc">
2580
+ <h4>Description</h4>
2581
+
2582
+ <p>Specify the stroke opacity.</p>
2583
+
2584
+ <h4>Arguments</h4>
2585
+
2586
+ <p>A number between 0 and 1, inclusive, or a percentage
2587
+ represented as a string, i.e. '30%'. The argument 0.3 is the
2588
+ same as '30%'.</p>
2589
+
2590
+ <h4>Returns</h4>
2591
+
2592
+ <p>self</p>
2593
+
2594
+ <h4>Example</h4>
2595
+ <pre>
2596
+ draw.stroke_opacity(0.4)
2597
+ draw.stroke_opacity('40%')
2598
+ </pre>
2599
+
2600
+ <h4>See also</h4><a href="#fill_opacity">fill_opacity</a>,
2601
+ <a href="#opacity">opacity</a>
2602
+ </div>
2603
+
2604
+ <div class="sig">
2605
+ <h3 id="stroke_width">stroke_width</h3>
2606
+
2607
+ <p><span class="arg">draw</span>.stroke_width(<span class=
2608
+ "arg">integer</span>) -&gt; <em>self</em></p>
2609
+ </div>
2610
+
2611
+ <div class="desc">
2612
+ <h4>Description</h4>
2613
+
2614
+ <p>Specify the stroke width in pixels. The default is 1.</p>
2615
+
2616
+ <h4>Returns</h4>
2617
+
2618
+ <p>self</p>
2619
+
2620
+ <h4>Example</h4>
2621
+
2622
+ <p><a href="javascript:popup('stroke_width.rb.html')"><img src=
2623
+ "ex/stroke_width.gif" alt="stroke_width example" title=
2624
+ "Click to see the example script" /></a></p>
2625
+ </div>
2626
+
2627
+ <div class="sig">
2628
+ <h3 id="text">text</h3>
2629
+
2630
+ <p><span class="arg">draw</span>.text(<span class=
2631
+ "arg">x</span>,<span class="arg">y</span>, <span class=
2632
+ "arg">text</span>) -&gt; <em>self</em></p>
2633
+ </div>
2634
+
2635
+ <div class="desc">
2636
+ <h4>Description</h4>
2637
+
2638
+ <p>Draw text at the location specified by (<span class=
2639
+ "arg">x</span>,<span class="arg">y</span>). Use <a href=
2640
+ "#gravity">gravity</a> to position <span class=
2641
+ "arg">text</span> relative to (<span class="arg">x</span>,
2642
+ <span class="arg">y</span>). Specify the font appearance with
2643
+ the <a href="#font">font</a>, <a href=
2644
+ "#font_family">font_family</a>, <a href=
2645
+ "#font_stretch">font_stretch</a>, <a href=
2646
+ "#font_style">font_style</a>, and <a href=
2647
+ "#font_weight">font_weight</a> methods. Specify the text
2648
+ attributes with the <a href="#text_align">text_align</a>,
2649
+ <a href="#text_anchor">text_anchor</a>, <a href=
2650
+ "text_antialias">text_antialias</a>, and <a href=
2651
+ "text_undercolor">text_undercolor</a> methods.</p>
2652
+
2653
+ <p>Generally it is a good idea to surround the text string with
2654
+ quotes (""), apostrophes (''), or braces ({}). If the text
2655
+ string starts with a digit or contains an embedded blank,
2656
+ quote, or apostrophe, you must do this. ImageMagick removes
2657
+ these characters before drawing the text. You can also escape a
2658
+ blank, quote, or apostrophe by preceding it with a backslash
2659
+ ("\"). To include a backslash in the text, use two consecutive
2660
+ backslashes. To include a '%' in the text, use '%%'. See the
2661
+ examples below.</p>
2662
+
2663
+ <h4>Arguments</h4>
2664
+
2665
+ <dl>
2666
+ <dt>x, y</dt>
2667
+
2668
+ <dd>The text position, influenced by <a href=
2669
+ "#gravity">gravity</a>.</dd>
2670
+
2671
+ <dt>text</dt>
2672
+
2673
+ <dd>The text.</dd>
2674
+ </dl>
2675
+
2676
+ <h4>Returns</h4>
2677
+
2678
+ <p>self</p>
2679
+
2680
+ <h4>Quoting examples</h4>
2681
+
2682
+ <p>The text to the right of &raquo; is the text that will be
2683
+ drawn.</p>
2684
+ <pre>
2685
+ gc.text(10,10, '"Hello there!"') &raquo; Hello there!
2686
+ gc.text(10,10, "'What\'s up?'") &raquo; What's up?
2687
+ gc.text(10,10, %q/"What's up?"/) &raquo; What's up?
2688
+ gc.text(10,10, %q/{"What's up?"}/) &raquo; "What's up?"
2689
+ </pre>
2690
+
2691
+ <h4>Example</h4>
2692
+
2693
+ <p><a href="javascript:popup('text.rb.html')"><img src=
2694
+ "ex/text.gif" alt="text example" title=
2695
+ "Click to see the example script" /></a></p>
2696
+
2697
+ <h4>See also</h4><a href="#annotate">annotate</a>
2698
+ </div>
2699
+
2700
+ <div class="sig">
2701
+ <h3 id="text_align">text_align</h3>
2702
+
2703
+ <p><span class="arg">draw</span>.text_align(<span class=
2704
+ "arg">alignment</span>) -&gt; <em>self</em></p>
2705
+ </div>
2706
+
2707
+ <div class="desc">
2708
+ <h4>Description</h4>
2709
+
2710
+ <p>Align text relative to the starting point.</p>
2711
+
2712
+ <h4>Arguments</h4>
2713
+
2714
+ <p>An <a href="constants.html#AlignType">AlignType</a>
2715
+ constant.</p>
2716
+
2717
+ <h4>Returns</h4>
2718
+
2719
+ <p>self</p>
2720
+
2721
+ <h4>Example</h4>
2722
+
2723
+ <p><a href="javascript:popup('text_align.rb.html')"><img src=
2724
+ "ex/text_align.gif" alt="text_align example" title=
2725
+ "Click to see the example script" /></a></p>
2726
+ </div>
2727
+
2728
+ <div class="sig">
2729
+ <h3 id="text_anchor">text_anchor</h3>
2730
+
2731
+ <p><span class="arg">draw</span>.text_anchor(<span class=
2732
+ "arg">anchor</span>) -&gt; <em>self</em></p>
2733
+ </div>
2734
+
2735
+ <div class="desc">
2736
+ <h4>Description</h4>
2737
+
2738
+ <p>Align text relative to the starting point. This is the SVG
2739
+ 1.1 equivalent to <a href="#text_align">text_align</a>.</p>
2740
+
2741
+ <h4>Arguments</h4>
2742
+
2743
+ <p>One of the constants <code>StartAnchor</code>,
2744
+ <code>MiddleAnchor</code>, or <code>EndAnchor</code>.</p>
2745
+
2746
+ <h4>Returns</h4>
2747
+
2748
+ <p>self</p>
2749
+ </div>
2750
+
2751
+ <div class="sig">
2752
+ <h3 id="text_antialias">text_antialias</h3>
2753
+
2754
+ <p><span class=
2755
+ "arg">draw</span>.text_antialias(<code>true</code> or
2756
+ <code>false</code>) -&gt; <em>self</em></p>
2757
+ </div>
2758
+
2759
+ <div class="desc">
2760
+ <h4>Description</h4>
2761
+
2762
+ <p>Specify if the text is to be antialiased.</p>
2763
+
2764
+ <h4>Arguments</h4>
2765
+
2766
+ <p>Either <code>true</code> or <code>false</code>. The default
2767
+ is <code>true</code>.</p>
2768
+
2769
+ <h4>Returns</h4>
2770
+
2771
+ <p>self</p>
2772
+
2773
+ <h4>Example</h4>
2774
+
2775
+ <p>The character on the left is not antialiased. The character
2776
+ on the right is antialiased.</p><a href=
2777
+ "javascript:popup('text_antialias.rb.html')"><img src=
2778
+ "ex/text_antialias.gif" alt="text_antialias example" title=
2779
+ "Click to see the example script" /></a>
2780
+
2781
+ <h4>See also</h4><a href=
2782
+ "#stroke_antialias">stroke_antialias</a>
2783
+ </div>
2784
+
2785
+ <div class="sig">
2786
+ <h3 id="text_undercolor">text_undercolor</h3>
2787
+
2788
+ <p><span class="arg">draw</span>.text_undercolor(<span class=
2789
+ "arg">string</span>) -&gt; <em>self</em></p>
2790
+ </div>
2791
+
2792
+ <div class="desc">
2793
+ <h4>Description</h4>
2794
+
2795
+ <p>The color to draw underneath text. The default is
2796
+ transparent.</p>
2797
+
2798
+ <h4>Arguments</h4>
2799
+
2800
+ <p>A color name.</p>
2801
+
2802
+ <h4>Returns</h4>
2803
+
2804
+ <p>self</p>
2805
+
2806
+ <h4>Example</h4>
2807
+
2808
+ <p><a href=
2809
+ "javascript:popup('text_undercolor.rb.html')"><img src=
2810
+ "ex/text_undercolor.gif" alt="text_undercolor example" title=
2811
+ "Click to see the example script" /></a></p>
2812
+ </div>
2813
+
2814
+ <div class="sig">
2815
+ <h3 id="translate">translate</h3>
2816
+
2817
+ <p><span class="arg">draw</span>.translate(<span class=
2818
+ "arg">tx</span>, <span class="arg">ty</span>) -&gt;
2819
+ <em>self</em></p>
2820
+ </div>
2821
+
2822
+ <div class="desc">
2823
+ <h4>Description</h4>
2824
+
2825
+ <p>Specify a translation operation on the coordinate space.</p>
2826
+
2827
+ <h4>Arguments</h4>
2828
+
2829
+ <dl>
2830
+ <dt>tx, ty</dt>
2831
+
2832
+ <dd>The amount of translation in the x and y directions.</dd>
2833
+ </dl>
2834
+
2835
+ <h4>Returns</h4>
2836
+
2837
+ <p>self</p>
2838
+
2839
+ <h4>Example</h4>
2840
+
2841
+ <p><code>gc.translate(125, 125)</code></p>
2842
+
2843
+ <p><a href="javascript:popup('translate.rb.html')"><img src=
2844
+ "ex/translate.gif" alt="translate example" title=
2845
+ "Click to see the example script" /></a></p>
2846
+
2847
+ <h4>See also</h4>
2848
+
2849
+ <p><a href="#affine">affine</a></p>
2850
+ </div>
2851
+
2852
+ <h2 class="methods" id="attributes">annotate attributes</h2>
2853
+
2854
+ <div class="sig">
2855
+ <h3 id="affine_eq">affine=</h3>
2856
+
2857
+ <p><span class="arg">draw</span>.affine = <em>matrix</em></p>
2858
+ </div>
2859
+
2860
+ <div class="desc">
2861
+ <h4>Description</h4>
2862
+
2863
+ <p>The transformation matrix. The default is the null
2864
+ transformation.</p>
2865
+
2866
+ <h4>Argument</h4>
2867
+
2868
+ <p>An <a href="struct.html#AffineMatrix">AffineMatrix</a>.</p>
2869
+ </div>
2870
+
2871
+ <div class="sig">
2872
+ <h3 id="align_eq">align=</h3>
2873
+
2874
+ <p><span class="arg">draw</span>.align = <em>alignment</em></p>
2875
+ </div>
2876
+
2877
+ <div class="desc">
2878
+ <h4>Description</h4>
2879
+
2880
+ <p>The text alignment. The default is
2881
+ <code>LeftAlign</code>.</p>
2882
+
2883
+ <h4>Argument</h4>
2884
+
2885
+ <p>A <a href="constants.html#AlignType">AlignType</a>
2886
+ constant.</p>
2887
+ </div>
2888
+
2889
+ <div class="sig">
2890
+ <h3 id="decorate_eq">decorate=</h3>
2891
+
2892
+ <p><span class="arg">draw</span>.decorate =
2893
+ <em>decoration</em></p>
2894
+ </div>
2895
+
2896
+ <div class="desc">
2897
+ <h4>Description</h4>
2898
+
2899
+ <p>The text decoration. The default is
2900
+ <code>NoDecorationType</code>.</p>
2901
+
2902
+ <h4>Argument</h4>
2903
+
2904
+ <p>A <a href="constants.html#DecorationType">DecorationType</a>
2905
+ constant.</p>
2906
+ </div>
2907
+
2908
+ <div class="sig">
2909
+ <h3 id="density_eq">density=</h3>
2910
+
2911
+ <p><span class="arg">draw</span>.density = <em>string</em></p>
2912
+ </div>
2913
+
2914
+ <div class="desc">
2915
+ <h4>Description</h4>
2916
+
2917
+ <p>The text density in the x and y directions. The default is
2918
+ "72x72".</p>
2919
+ </div>
2920
+
2921
+ <div class="sig">
2922
+ <h3 id="encoding_eq">encoding=</h3>
2923
+
2924
+ <p><span class="arg">draw</span>.encoding = <em>string</em></p>
2925
+ </div>
2926
+
2927
+ <div class="desc">
2928
+ <h4>Description</h4>
2929
+
2930
+ <p>The text encoding.</p>
2931
+
2932
+ <h4>Argument</h4>
2933
+
2934
+ <p>See the ImageMagick documentation for the
2935
+ <code>-encoding</code> option to the <code>mogrify</code>
2936
+ command.</p>
2937
+ </div>
2938
+
2939
+ <div class="sig">
2940
+ <h3 id="fill_eq">fill=</h3>
2941
+
2942
+ <p><span class="arg">draw</span>.fill = <em>string</em> or
2943
+ <em>pixel</em></p>
2944
+ </div>
2945
+
2946
+ <div class="desc">
2947
+ <h4>Description</h4>The fill color. The default is "black".
2948
+
2949
+ <h4>Argument</h4>
2950
+
2951
+ <p>May be a <a href="imusage.html#color_names">color name</a>
2952
+ or a <a href="struct.html#Pixel">Pixel</a> object.</p>
2953
+ </div>
2954
+
2955
+ <div class="sig">
2956
+ <h3 id="fill_pattern_eq">fill_pattern=</h3>
2957
+
2958
+ <p><span class="arg">draw</span>.fill_pattern =
2959
+ <em>image</em></p>
2960
+ </div>
2961
+
2962
+ <div class="desc">
2963
+ <h4>Description</h4>Specify an image to use for the fill.
2964
+
2965
+ <h4>Argument</h4>
2966
+
2967
+ <p>An image.</p>
2968
+
2969
+ <h4>Example</h4>
2970
+
2971
+ <p><a href="javascript:popup('fill_pattern.rb.html')" title=
2972
+ "Click to see the example script"><img src=
2973
+ "ex/fill_pattern.gif" alt=
2974
+ "fill_pattern and stroke_pattern example" /></a></p>
2975
+ </div>
2976
+
2977
+ <div class="sig">
2978
+ <h3 id="font_eq">font=</h3>
2979
+
2980
+ <p><span class="arg">draw</span>.font = <em>string</em></p>
2981
+ </div>
2982
+
2983
+ <div class="desc">
2984
+ <h4>Description</h4>
2985
+
2986
+ <p>The font name. The default is "Helvetica". See <a href=
2987
+ "#font">font</a> for more information about font names.</p>
2988
+ </div>
2989
+
2990
+ <div class="sig">
2991
+ <h3 id="font_family_eq">font_family=</h3>
2992
+
2993
+ <p><span class="arg">draw</span>.font_family =
2994
+ <em>string</em></p>
2995
+ </div>
2996
+
2997
+ <div class="desc">
2998
+ <h4>Description</h4>
2999
+
3000
+ <p>The font family name. For example, "arial" or
3001
+ "helvetica".</p>
3002
+ </div>
3003
+
3004
+ <div class="sig">
3005
+ <h3 id="font_stretch_eq">font_stretch=</h3>
3006
+
3007
+ <p><span class="arg">draw</span>.font_stretch =
3008
+ <em>stretch</em></p>
3009
+ </div>
3010
+
3011
+ <div class="desc">
3012
+ <h4>Description</h4>
3013
+
3014
+ <p>The font stretch.</p>
3015
+
3016
+ <h4>Argument</h4>A <a href=
3017
+ "constants.html#StretchType">StretchType</a> constant.
3018
+ </div>
3019
+
3020
+ <div class="sig">
3021
+ <h3 id="font_style_eq">font_style=</h3>
3022
+
3023
+ <p><span class="arg">draw</span>.font_style =
3024
+ <em>style</em></p>
3025
+ </div>
3026
+
3027
+ <div class="desc">
3028
+ <h4>Description</h4>
3029
+
3030
+ <p>The font style.</p>
3031
+
3032
+ <h4>Argument</h4>
3033
+
3034
+ <p>A <a href="constants.html#StyleType">StyleType</a>
3035
+ constant.</p>
3036
+ </div>
3037
+
3038
+ <div class="sig">
3039
+ <h3 id="font_weight_eq">font_weight=</h3>
3040
+
3041
+ <p><span class="arg">draw</span>.font_weight =
3042
+ <em>weight</em></p>
3043
+ </div>
3044
+
3045
+ <div class="desc">
3046
+ <h4>Description</h4>
3047
+
3048
+ <p>The font weight.</p>
3049
+
3050
+ <h4>Arguments</h4>
3051
+
3052
+ <p>A <a href="constants.html#WeightType">WeightType</a>
3053
+ constant or one of the numbers 100, 200, 300, 400, 500, 600,
3054
+ 700, 800, or 900.</p>
3055
+ </div>
3056
+
3057
+ <div class="sig">
3058
+ <h3 id="gravity_eq">gravity=</h3>
3059
+
3060
+ <p><span class="arg">draw</span>.gravity = <em>gravity</em></p>
3061
+ </div>
3062
+
3063
+ <div class="desc">
3064
+ <h4>Description</h4>
3065
+
3066
+ <p>Specifies how to orient text with respect to the text's
3067
+ origin.</p>
3068
+
3069
+ <h4>Arguments</h4>
3070
+
3071
+ <p>A <a href="constants.html#GravityType">GravityType</a>
3072
+ constant.</p>
3073
+ </div>
3074
+
3075
+ <div class="sig">
3076
+ <h3 id="interline_spacing_eq">interline_spacing=</h3>
3077
+
3078
+ <p><span class="arg">draw</span>.interline_spacing =
3079
+ <em>space</em></p>
3080
+ </div>
3081
+
3082
+ <div class="desc">
3083
+ <h4>Description</h4>
3084
+
3085
+ <p>Modifies the space between lines.</p>
3086
+
3087
+ <h4>Arguments</h4>
3088
+
3089
+ <p>A numeric value. May be positive or negative.</p>
3090
+
3091
+ <h4>Notes</h4>
3092
+
3093
+ <p>Available in ImageMagick 6.5.5-8.</p>
3094
+ </div>
3095
+
3096
+ <div class="sig">
3097
+ <h3 id="interword_spacing_eq">interword_spacing=</h3>
3098
+
3099
+ <p><span class="arg">draw</span>.interword_spacing =
3100
+ <em>space</em></p>
3101
+ </div>
3102
+
3103
+ <div class="desc">
3104
+ <h4>Description</h4>
3105
+
3106
+ <p>Modifies the space between two words.</p>
3107
+
3108
+ <h4>Arguments</h4>
3109
+
3110
+ <p>A numeric value. May be positive or negative.</p>
3111
+
3112
+ <h4>Notes</h4>
3113
+
3114
+ <p>Available in ImageMagick 6.4.8-0.</p>
3115
+ </div>
3116
+
3117
+ <div class="sig">
3118
+ <h3 id="kerning_eq">kerning=</h3>
3119
+
3120
+ <p><span class="arg">draw</span>.kerning = <em>space</em></p>
3121
+ </div>
3122
+
3123
+ <div class="desc">
3124
+ <h4>Description</h4>
3125
+
3126
+ <p>Modifies the space between two letters.</p>
3127
+
3128
+ <h4>Arguments</h4>
3129
+
3130
+ <p>A numeric value. May be positive or negative.</p>
3131
+
3132
+ <h4>Notes</h4>
3133
+
3134
+ <p>Available in ImageMagick 6.4.7-8.</p>
3135
+ </div>
3136
+
3137
+ <div class="sig">
3138
+ <h3 id="pointsize_eq">pointsize=</h3>
3139
+
3140
+ <p><span class="arg">draw</span>.pointsize =
3141
+ <em>integer</em></p>
3142
+ </div>
3143
+
3144
+ <div class="desc">
3145
+ <h4>Description</h4>
3146
+
3147
+ <p>The font size in points. The default is 12.</p>
3148
+ </div>
3149
+
3150
+ <div class="sig">
3151
+ <h3 id="rotation_eq">rotation=</h3>
3152
+
3153
+ <p><span class="arg">draw</span>.rotation = <em>number</em></p>
3154
+ </div>
3155
+
3156
+ <div class="desc">
3157
+ <h4>Description</h4>
3158
+
3159
+ <p>Apply rotation to text. The default is no rotation.</p>
3160
+
3161
+ <h4>Arguments</h4>
3162
+
3163
+ <p>The amount of rotation in degrees.</p>
3164
+ </div>
3165
+
3166
+ <div class="sig">
3167
+ <h3 id="stroke_eq">stroke=</h3>
3168
+
3169
+ <p><span class="arg">draw</span>.stroke = <em>string</em> or
3170
+ <em>pixel</em></p>
3171
+ </div>
3172
+
3173
+ <div class="desc">
3174
+ <h4>Description</h4>
3175
+
3176
+ <p>The stroke color. This is the color used to outline the
3177
+ text. The default is "black".</p>
3178
+
3179
+ <h4>Arguments</h4>A <a href="imusage.html#color_names">color
3180
+ name</a> or <a href="struct.html#Pixel">Pixel</a> object.
3181
+ </div>
3182
+
3183
+ <div class="sig">
3184
+ <h3 id="stroke_pattern_eq">stroke_pattern=</h3>
3185
+
3186
+ <p><span class="arg">draw</span>.stroke_pattern =
3187
+ <em>image</em></p>
3188
+ </div>
3189
+
3190
+ <div class="desc">
3191
+ <h4>Description</h4>Specify an image to use for the stroke.
3192
+
3193
+ <h4>Argument</h4>
3194
+
3195
+ <p>An image.</p>
3196
+
3197
+ <h4>Example</h4>
3198
+
3199
+ <p>See <a href="#fill_pattern_eq">fill_pattern</a></p>
3200
+ </div>
3201
+
3202
+ <div class="sig">
3203
+ <h3 id="stroke_width_eq">stroke_width=</h3>
3204
+
3205
+ <p><span class="arg">draw</span>.stroke = <em>integer</em></p>
3206
+ </div>
3207
+
3208
+ <div class="desc">
3209
+ <h4>Description</h4>
3210
+
3211
+ <p>The stroke width in pixels. The default is 1.</p>
3212
+ </div>
3213
+
3214
+ <div class="sig">
3215
+ <h3 id="text_antialias_eq">text_antialias=</h3>
3216
+
3217
+ <p><span class="arg">draw</span>.text_antialias =
3218
+ <em><code>true</code> or <code>false</code></em></p>
3219
+ </div>
3220
+
3221
+ <div class="desc">
3222
+ <h4>Description</h4>
3223
+
3224
+ <p>Whether the text is antialiased or not. The default is
3225
+ <code>true</code>.</p>
3226
+ </div>
3227
+
3228
+ <div class="sig">
3229
+ <h3 id="tile_eq">tile=</h3>
3230
+
3231
+ <p><span class="arg">draw</span>.tile = <em>image</em></p>
3232
+ </div>
3233
+
3234
+ <div class="desc">
3235
+ <h4>Description</h4>
3236
+
3237
+ <p>Tile image when filling a graphic primitive.</p>
3238
+
3239
+ <h4>Arguments</h4>
3240
+
3241
+ <p>An image</p>
3242
+ </div>
3243
+
3244
+ <div class="sig">
3245
+ <h3 id="undercolor_eq">undercolor=</h3>
3246
+
3247
+ <p><span class="arg">draw</span>.undercolor = <em>string</em>
3248
+ or <em>pixel</em></p>
3249
+ </div>
3250
+
3251
+ <div class="desc">
3252
+ <h4>Description</h4>
3253
+
3254
+ <p>If set, causes the text to be drawn over a box of the
3255
+ specified color.</p>
3256
+
3257
+ <h4>Arguments</h4>A <a href="imusage.html#color_names">color
3258
+ name</a> or a <a href="struct.html#Pixel">Pixel</a> object.
3259
+ </div>
3260
+
3261
+ <p class="spacer">&nbsp;</p>
3262
+
3263
+ <div class="nav">
3264
+ &laquo;&nbsp;<a href="image3.html">Prev</a> | <a href=
3265
+ "index.html">Contents</a> | <a href=
3266
+ "struct.html">Next</a>&nbsp;&raquo;
3267
+ </div>
3268
+ </body>
3269
+ </html>