Imlib2-Ruby 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +41 -0
  3. data/COPYING +20 -0
  4. data/ChangeLog +280 -0
  5. data/MANIFEST +25 -0
  6. data/README +65 -0
  7. data/TODO +12 -0
  8. data/depend +1 -0
  9. data/doc/classes/Imlib2.html +151 -0
  10. data/doc/classes/Imlib2/Border.html +526 -0
  11. data/doc/classes/Imlib2/Border.src/M000094.html +34 -0
  12. data/doc/classes/Imlib2/Border.src/M000095.html +21 -0
  13. data/doc/classes/Imlib2/Border.src/M000098.html +23 -0
  14. data/doc/classes/Imlib2/Border.src/M000099.html +23 -0
  15. data/doc/classes/Imlib2/Border.src/M000100.html +23 -0
  16. data/doc/classes/Imlib2/Border.src/M000101.html +23 -0
  17. data/doc/classes/Imlib2/Border.src/M000102.html +23 -0
  18. data/doc/classes/Imlib2/Border.src/M000103.html +23 -0
  19. data/doc/classes/Imlib2/Border.src/M000104.html +23 -0
  20. data/doc/classes/Imlib2/Border.src/M000105.html +23 -0
  21. data/doc/classes/Imlib2/Cache.html +475 -0
  22. data/doc/classes/Imlib2/Cache.src/M000081.html +24 -0
  23. data/doc/classes/Imlib2/Cache.src/M000082.html +29 -0
  24. data/doc/classes/Imlib2/Cache.src/M000083.html +24 -0
  25. data/doc/classes/Imlib2/Cache.src/M000084.html +29 -0
  26. data/doc/classes/Imlib2/Cache.src/M000085.html +24 -0
  27. data/doc/classes/Imlib2/Cache.src/M000086.html +29 -0
  28. data/doc/classes/Imlib2/Cache.src/M000087.html +24 -0
  29. data/doc/classes/Imlib2/Cache.src/M000088.html +28 -0
  30. data/doc/classes/Imlib2/Cache.src/M000089.html +24 -0
  31. data/doc/classes/Imlib2/Cache.src/M000090.html +28 -0
  32. data/doc/classes/Imlib2/Cache.src/M000091.html +24 -0
  33. data/doc/classes/Imlib2/Cache.src/M000092.html +28 -0
  34. data/doc/classes/Imlib2/Cache.src/M000093.html +23 -0
  35. data/doc/classes/Imlib2/Color.html +115 -0
  36. data/doc/classes/Imlib2/Color/CmyaColor.html +598 -0
  37. data/doc/classes/Imlib2/Color/CmyaColor.src/M000001.html +27 -0
  38. data/doc/classes/Imlib2/Color/CmyaColor.src/M000002.html +21 -0
  39. data/doc/classes/Imlib2/Color/CmyaColor.src/M000005.html +23 -0
  40. data/doc/classes/Imlib2/Color/CmyaColor.src/M000006.html +23 -0
  41. data/doc/classes/Imlib2/Color/CmyaColor.src/M000007.html +23 -0
  42. data/doc/classes/Imlib2/Color/CmyaColor.src/M000008.html +23 -0
  43. data/doc/classes/Imlib2/Color/CmyaColor.src/M000009.html +23 -0
  44. data/doc/classes/Imlib2/Color/CmyaColor.src/M000010.html +23 -0
  45. data/doc/classes/Imlib2/Color/CmyaColor.src/M000011.html +23 -0
  46. data/doc/classes/Imlib2/Color/CmyaColor.src/M000012.html +23 -0
  47. data/doc/classes/Imlib2/Color/CmyaColor.src/M000013.html +23 -0
  48. data/doc/classes/Imlib2/Color/CmyaColor.src/M000014.html +23 -0
  49. data/doc/classes/Imlib2/Color/CmyaColor.src/M000015.html +23 -0
  50. data/doc/classes/Imlib2/Color/CmyaColor.src/M000016.html +23 -0
  51. data/doc/classes/Imlib2/Color/CmyaColor.src/M000017.html +23 -0
  52. data/doc/classes/Imlib2/Color/CmyaColor.src/M000018.html +23 -0
  53. data/doc/classes/Imlib2/Color/CmyaColor.src/M000019.html +23 -0
  54. data/doc/classes/Imlib2/Color/CmyaColor.src/M000020.html +23 -0
  55. data/doc/classes/Imlib2/Color/HlsaColor.html +606 -0
  56. data/doc/classes/Imlib2/Color/HlsaColor.src/M000061.html +27 -0
  57. data/doc/classes/Imlib2/Color/HlsaColor.src/M000062.html +21 -0
  58. data/doc/classes/Imlib2/Color/HlsaColor.src/M000065.html +23 -0
  59. data/doc/classes/Imlib2/Color/HlsaColor.src/M000066.html +23 -0
  60. data/doc/classes/Imlib2/Color/HlsaColor.src/M000067.html +23 -0
  61. data/doc/classes/Imlib2/Color/HlsaColor.src/M000068.html +23 -0
  62. data/doc/classes/Imlib2/Color/HlsaColor.src/M000069.html +23 -0
  63. data/doc/classes/Imlib2/Color/HlsaColor.src/M000070.html +23 -0
  64. data/doc/classes/Imlib2/Color/HlsaColor.src/M000071.html +23 -0
  65. data/doc/classes/Imlib2/Color/HlsaColor.src/M000072.html +23 -0
  66. data/doc/classes/Imlib2/Color/HlsaColor.src/M000073.html +23 -0
  67. data/doc/classes/Imlib2/Color/HlsaColor.src/M000074.html +23 -0
  68. data/doc/classes/Imlib2/Color/HlsaColor.src/M000075.html +23 -0
  69. data/doc/classes/Imlib2/Color/HlsaColor.src/M000076.html +23 -0
  70. data/doc/classes/Imlib2/Color/HlsaColor.src/M000077.html +23 -0
  71. data/doc/classes/Imlib2/Color/HlsaColor.src/M000078.html +23 -0
  72. data/doc/classes/Imlib2/Color/HlsaColor.src/M000079.html +23 -0
  73. data/doc/classes/Imlib2/Color/HlsaColor.src/M000080.html +23 -0
  74. data/doc/classes/Imlib2/Color/HsvaColor.html +602 -0
  75. data/doc/classes/Imlib2/Color/HsvaColor.src/M000021.html +27 -0
  76. data/doc/classes/Imlib2/Color/HsvaColor.src/M000022.html +21 -0
  77. data/doc/classes/Imlib2/Color/HsvaColor.src/M000025.html +23 -0
  78. data/doc/classes/Imlib2/Color/HsvaColor.src/M000026.html +23 -0
  79. data/doc/classes/Imlib2/Color/HsvaColor.src/M000027.html +23 -0
  80. data/doc/classes/Imlib2/Color/HsvaColor.src/M000028.html +23 -0
  81. data/doc/classes/Imlib2/Color/HsvaColor.src/M000029.html +23 -0
  82. data/doc/classes/Imlib2/Color/HsvaColor.src/M000030.html +23 -0
  83. data/doc/classes/Imlib2/Color/HsvaColor.src/M000031.html +23 -0
  84. data/doc/classes/Imlib2/Color/HsvaColor.src/M000032.html +23 -0
  85. data/doc/classes/Imlib2/Color/HsvaColor.src/M000033.html +23 -0
  86. data/doc/classes/Imlib2/Color/HsvaColor.src/M000034.html +23 -0
  87. data/doc/classes/Imlib2/Color/HsvaColor.src/M000035.html +23 -0
  88. data/doc/classes/Imlib2/Color/HsvaColor.src/M000036.html +23 -0
  89. data/doc/classes/Imlib2/Color/HsvaColor.src/M000037.html +23 -0
  90. data/doc/classes/Imlib2/Color/HsvaColor.src/M000038.html +23 -0
  91. data/doc/classes/Imlib2/Color/HsvaColor.src/M000039.html +23 -0
  92. data/doc/classes/Imlib2/Color/HsvaColor.src/M000040.html +23 -0
  93. data/doc/classes/Imlib2/Color/RgbaColor.html +598 -0
  94. data/doc/classes/Imlib2/Color/RgbaColor.src/M000041.html +27 -0
  95. data/doc/classes/Imlib2/Color/RgbaColor.src/M000042.html +21 -0
  96. data/doc/classes/Imlib2/Color/RgbaColor.src/M000045.html +23 -0
  97. data/doc/classes/Imlib2/Color/RgbaColor.src/M000046.html +23 -0
  98. data/doc/classes/Imlib2/Color/RgbaColor.src/M000047.html +23 -0
  99. data/doc/classes/Imlib2/Color/RgbaColor.src/M000048.html +23 -0
  100. data/doc/classes/Imlib2/Color/RgbaColor.src/M000049.html +23 -0
  101. data/doc/classes/Imlib2/Color/RgbaColor.src/M000050.html +23 -0
  102. data/doc/classes/Imlib2/Color/RgbaColor.src/M000051.html +23 -0
  103. data/doc/classes/Imlib2/Color/RgbaColor.src/M000052.html +23 -0
  104. data/doc/classes/Imlib2/Color/RgbaColor.src/M000053.html +23 -0
  105. data/doc/classes/Imlib2/Color/RgbaColor.src/M000054.html +23 -0
  106. data/doc/classes/Imlib2/Color/RgbaColor.src/M000055.html +23 -0
  107. data/doc/classes/Imlib2/Color/RgbaColor.src/M000056.html +23 -0
  108. data/doc/classes/Imlib2/Color/RgbaColor.src/M000057.html +23 -0
  109. data/doc/classes/Imlib2/Color/RgbaColor.src/M000058.html +23 -0
  110. data/doc/classes/Imlib2/Color/RgbaColor.src/M000059.html +23 -0
  111. data/doc/classes/Imlib2/Color/RgbaColor.src/M000060.html +23 -0
  112. data/doc/classes/Imlib2/ColorModifier.html +266 -0
  113. data/doc/classes/Imlib2/ColorModifier.src/M000414.html +23 -0
  114. data/doc/classes/Imlib2/ColorModifier.src/M000415.html +22 -0
  115. data/doc/classes/Imlib2/ColorModifier.src/M000416.html +23 -0
  116. data/doc/classes/Imlib2/ColorModifier.src/M000417.html +23 -0
  117. data/doc/classes/Imlib2/ColorModifier.src/M000418.html +23 -0
  118. data/doc/classes/Imlib2/ColorModifier.src/M000419.html +23 -0
  119. data/doc/classes/Imlib2/Context.html +2764 -0
  120. data/doc/classes/Imlib2/Context.src/M000121.html +23 -0
  121. data/doc/classes/Imlib2/Context.src/M000122.html +22 -0
  122. data/doc/classes/Imlib2/Context.src/M000123.html +23 -0
  123. data/doc/classes/Imlib2/Context.src/M000124.html +23 -0
  124. data/doc/classes/Imlib2/Context.src/M000125.html +23 -0
  125. data/doc/classes/Imlib2/Context.src/M000126.html +23 -0
  126. data/doc/classes/Imlib2/Context.src/M000127.html +23 -0
  127. data/doc/classes/Imlib2/Context.src/M000128.html +23 -0
  128. data/doc/classes/Imlib2/Context.src/M000129.html +25 -0
  129. data/doc/classes/Imlib2/Context.src/M000130.html +25 -0
  130. data/doc/classes/Imlib2/Context.src/M000131.html +23 -0
  131. data/doc/classes/Imlib2/Context.src/M000132.html +23 -0
  132. data/doc/classes/Imlib2/Context.src/M000133.html +25 -0
  133. data/doc/classes/Imlib2/Context.src/M000134.html +25 -0
  134. data/doc/classes/Imlib2/Context.src/M000135.html +23 -0
  135. data/doc/classes/Imlib2/Context.src/M000136.html +23 -0
  136. data/doc/classes/Imlib2/Context.src/M000137.html +23 -0
  137. data/doc/classes/Imlib2/Context.src/M000138.html +25 -0
  138. data/doc/classes/Imlib2/Context.src/M000139.html +25 -0
  139. data/doc/classes/Imlib2/Context.src/M000140.html +25 -0
  140. data/doc/classes/Imlib2/Context.src/M000141.html +23 -0
  141. data/doc/classes/Imlib2/Context.src/M000142.html +23 -0
  142. data/doc/classes/Imlib2/Context.src/M000143.html +25 -0
  143. data/doc/classes/Imlib2/Context.src/M000144.html +25 -0
  144. data/doc/classes/Imlib2/Context.src/M000145.html +23 -0
  145. data/doc/classes/Imlib2/Context.src/M000146.html +23 -0
  146. data/doc/classes/Imlib2/Context.src/M000147.html +23 -0
  147. data/doc/classes/Imlib2/Context.src/M000148.html +23 -0
  148. data/doc/classes/Imlib2/Context.src/M000149.html +23 -0
  149. data/doc/classes/Imlib2/Context.src/M000150.html +23 -0
  150. data/doc/classes/Imlib2/Context.src/M000151.html +23 -0
  151. data/doc/classes/Imlib2/Context.src/M000152.html +23 -0
  152. data/doc/classes/Imlib2/Context.src/M000153.html +23 -0
  153. data/doc/classes/Imlib2/Context.src/M000154.html +25 -0
  154. data/doc/classes/Imlib2/Context.src/M000155.html +25 -0
  155. data/doc/classes/Imlib2/Context.src/M000156.html +25 -0
  156. data/doc/classes/Imlib2/Context.src/M000157.html +23 -0
  157. data/doc/classes/Imlib2/Context.src/M000158.html +23 -0
  158. data/doc/classes/Imlib2/Context.src/M000159.html +23 -0
  159. data/doc/classes/Imlib2/Context.src/M000160.html +23 -0
  160. data/doc/classes/Imlib2/Context.src/M000161.html +23 -0
  161. data/doc/classes/Imlib2/Context.src/M000162.html +23 -0
  162. data/doc/classes/Imlib2/Context.src/M000163.html +23 -0
  163. data/doc/classes/Imlib2/Context.src/M000164.html +25 -0
  164. data/doc/classes/Imlib2/Context.src/M000165.html +25 -0
  165. data/doc/classes/Imlib2/Context.src/M000166.html +25 -0
  166. data/doc/classes/Imlib2/Context.src/M000167.html +23 -0
  167. data/doc/classes/Imlib2/Context.src/M000168.html +23 -0
  168. data/doc/classes/Imlib2/Context.src/M000169.html +25 -0
  169. data/doc/classes/Imlib2/Context.src/M000170.html +25 -0
  170. data/doc/classes/Imlib2/Context.src/M000171.html +23 -0
  171. data/doc/classes/Imlib2/Context.src/M000172.html +23 -0
  172. data/doc/classes/Imlib2/Context.src/M000173.html +23 -0
  173. data/doc/classes/Imlib2/Context.src/M000174.html +23 -0
  174. data/doc/classes/Imlib2/Context.src/M000175.html +23 -0
  175. data/doc/classes/Imlib2/Context.src/M000176.html +23 -0
  176. data/doc/classes/Imlib2/Context.src/M000177.html +23 -0
  177. data/doc/classes/Imlib2/Context.src/M000178.html +23 -0
  178. data/doc/classes/Imlib2/Context.src/M000179.html +26 -0
  179. data/doc/classes/Imlib2/Context.src/M000180.html +26 -0
  180. data/doc/classes/Imlib2/Context.src/M000181.html +26 -0
  181. data/doc/classes/Imlib2/Context.src/M000182.html +26 -0
  182. data/doc/classes/Imlib2/Context.src/M000183.html +27 -0
  183. data/doc/classes/Imlib2/Context.src/M000184.html +27 -0
  184. data/doc/classes/Imlib2/Context.src/M000185.html +27 -0
  185. data/doc/classes/Imlib2/Context.src/M000186.html +27 -0
  186. data/doc/classes/Imlib2/Context.src/M000187.html +23 -0
  187. data/doc/classes/Imlib2/Context.src/M000188.html +23 -0
  188. data/doc/classes/Imlib2/Context.src/M000189.html +23 -0
  189. data/doc/classes/Imlib2/Context.src/M000190.html +23 -0
  190. data/doc/classes/Imlib2/Context.src/M000191.html +23 -0
  191. data/doc/classes/Imlib2/Context.src/M000192.html +23 -0
  192. data/doc/classes/Imlib2/Context.src/M000193.html +23 -0
  193. data/doc/classes/Imlib2/Context.src/M000194.html +25 -0
  194. data/doc/classes/Imlib2/Context.src/M000195.html +25 -0
  195. data/doc/classes/Imlib2/Context.src/M000196.html +25 -0
  196. data/doc/classes/Imlib2/Context.src/M000197.html +28 -0
  197. data/doc/classes/Imlib2/Context.src/M000198.html +28 -0
  198. data/doc/classes/Imlib2/Context.src/M000199.html +28 -0
  199. data/doc/classes/Imlib2/Context.src/M000200.html +28 -0
  200. data/doc/classes/Imlib2/Context.src/M000201.html +28 -0
  201. data/doc/classes/Imlib2/Context.src/M000202.html +28 -0
  202. data/doc/classes/Imlib2/Context.src/M000203.html +28 -0
  203. data/doc/classes/Imlib2/Context.src/M000204.html +28 -0
  204. data/doc/classes/Imlib2/Context.src/M000213.html +28 -0
  205. data/doc/classes/Imlib2/Context.src/M000214.html +28 -0
  206. data/doc/classes/Imlib2/Context.src/M000215.html +28 -0
  207. data/doc/classes/Imlib2/Context.src/M000216.html +28 -0
  208. data/doc/classes/Imlib2/Context.src/M000217.html +28 -0
  209. data/doc/classes/Imlib2/Context.src/M000218.html +28 -0
  210. data/doc/classes/Imlib2/Context.src/M000219.html +28 -0
  211. data/doc/classes/Imlib2/Context.src/M000220.html +28 -0
  212. data/doc/classes/Imlib2/Context.src/M000221.html +28 -0
  213. data/doc/classes/Imlib2/Context.src/M000222.html +28 -0
  214. data/doc/classes/Imlib2/Context.src/M000223.html +28 -0
  215. data/doc/classes/Imlib2/Context.src/M000224.html +28 -0
  216. data/doc/classes/Imlib2/Dir.html +106 -0
  217. data/doc/classes/Imlib2/Direction.html +164 -0
  218. data/doc/classes/Imlib2/Encoding.html +139 -0
  219. data/doc/classes/Imlib2/Error.html +112 -0
  220. data/doc/classes/Imlib2/Error/DeletedError.html +112 -0
  221. data/doc/classes/Imlib2/FileError.html +112 -0
  222. data/doc/classes/Imlib2/Filter.html +410 -0
  223. data/doc/classes/Imlib2/Filter.src/M000366.html +23 -0
  224. data/doc/classes/Imlib2/Filter.src/M000367.html +22 -0
  225. data/doc/classes/Imlib2/Filter.src/M000368.html +23 -0
  226. data/doc/classes/Imlib2/Filter.src/M000371.html +23 -0
  227. data/doc/classes/Imlib2/Filter.src/M000372.html +23 -0
  228. data/doc/classes/Imlib2/Filter.src/M000373.html +23 -0
  229. data/doc/classes/Imlib2/Filter.src/M000374.html +23 -0
  230. data/doc/classes/Imlib2/Filter.src/M000375.html +23 -0
  231. data/doc/classes/Imlib2/Filter.src/M000376.html +23 -0
  232. data/doc/classes/Imlib2/Filter.src/M000377.html +23 -0
  233. data/doc/classes/Imlib2/Filter.src/M000378.html +23 -0
  234. data/doc/classes/Imlib2/Font.html +1008 -0
  235. data/doc/classes/Imlib2/Font.src/M000379.html +28 -0
  236. data/doc/classes/Imlib2/Font.src/M000380.html +28 -0
  237. data/doc/classes/Imlib2/Font.src/M000381.html +22 -0
  238. data/doc/classes/Imlib2/Font.src/M000382.html +27 -0
  239. data/doc/classes/Imlib2/Font.src/M000383.html +27 -0
  240. data/doc/classes/Imlib2/Font.src/M000384.html +27 -0
  241. data/doc/classes/Imlib2/Font.src/M000385.html +28 -0
  242. data/doc/classes/Imlib2/Font.src/M000386.html +28 -0
  243. data/doc/classes/Imlib2/Font.src/M000387.html +28 -0
  244. data/doc/classes/Imlib2/Font.src/M000388.html +24 -0
  245. data/doc/classes/Imlib2/Font.src/M000389.html +24 -0
  246. data/doc/classes/Imlib2/Font.src/M000390.html +24 -0
  247. data/doc/classes/Imlib2/Font.src/M000391.html +24 -0
  248. data/doc/classes/Imlib2/Font.src/M000392.html +24 -0
  249. data/doc/classes/Imlib2/Font.src/M000393.html +24 -0
  250. data/doc/classes/Imlib2/Font.src/M000394.html +24 -0
  251. data/doc/classes/Imlib2/Font.src/M000395.html +23 -0
  252. data/doc/classes/Imlib2/Font.src/M000396.html +23 -0
  253. data/doc/classes/Imlib2/Font.src/M000397.html +23 -0
  254. data/doc/classes/Imlib2/Font.src/M000398.html +23 -0
  255. data/doc/classes/Imlib2/Font.src/M000399.html +23 -0
  256. data/doc/classes/Imlib2/Font.src/M000400.html +23 -0
  257. data/doc/classes/Imlib2/Font.src/M000401.html +23 -0
  258. data/doc/classes/Imlib2/Font.src/M000402.html +23 -0
  259. data/doc/classes/Imlib2/Font.src/M000403.html +23 -0
  260. data/doc/classes/Imlib2/Font.src/M000404.html +23 -0
  261. data/doc/classes/Imlib2/Font.src/M000405.html +23 -0
  262. data/doc/classes/Imlib2/Font.src/M000406.html +23 -0
  263. data/doc/classes/Imlib2/Font.src/M000407.html +23 -0
  264. data/doc/classes/Imlib2/Font.src/M000408.html +23 -0
  265. data/doc/classes/Imlib2/Font.src/M000409.html +23 -0
  266. data/doc/classes/Imlib2/Font.src/M000410.html +23 -0
  267. data/doc/classes/Imlib2/Font.src/M000411.html +23 -0
  268. data/doc/classes/Imlib2/Font.src/M000412.html +23 -0
  269. data/doc/classes/Imlib2/Font.src/M000413.html +23 -0
  270. data/doc/classes/Imlib2/Gradient.html +208 -0
  271. data/doc/classes/Imlib2/Gradient.src/M000420.html +32 -0
  272. data/doc/classes/Imlib2/Gradient.src/M000421.html +23 -0
  273. data/doc/classes/Imlib2/Gradient.src/M000422.html +27 -0
  274. data/doc/classes/Imlib2/Image.html +4005 -0
  275. data/doc/classes/Imlib2/Image.src/M000225.html +26 -0
  276. data/doc/classes/Imlib2/Image.src/M000226.html +20 -0
  277. data/doc/classes/Imlib2/Image.src/M000227.html +29 -0
  278. data/doc/classes/Imlib2/Image.src/M000228.html +29 -0
  279. data/doc/classes/Imlib2/Image.src/M000229.html +29 -0
  280. data/doc/classes/Imlib2/Image.src/M000230.html +29 -0
  281. data/doc/classes/Imlib2/Image.src/M000231.html +26 -0
  282. data/doc/classes/Imlib2/Image.src/M000232.html +26 -0
  283. data/doc/classes/Imlib2/Image.src/M000233.html +26 -0
  284. data/doc/classes/Imlib2/Image.src/M000234.html +29 -0
  285. data/doc/classes/Imlib2/Image.src/M000235.html +27 -0
  286. data/doc/classes/Imlib2/Image.src/M000236.html +27 -0
  287. data/doc/classes/Imlib2/Image.src/M000237.html +27 -0
  288. data/doc/classes/Imlib2/Image.src/M000238.html +28 -0
  289. data/doc/classes/Imlib2/Image.src/M000239.html +31 -0
  290. data/doc/classes/Imlib2/Image.src/M000240.html +30 -0
  291. data/doc/classes/Imlib2/Image.src/M000241.html +26 -0
  292. data/doc/classes/Imlib2/Image.src/M000242.html +27 -0
  293. data/doc/classes/Imlib2/Image.src/M000243.html +29 -0
  294. data/doc/classes/Imlib2/Image.src/M000244.html +24 -0
  295. data/doc/classes/Imlib2/Image.src/M000245.html +24 -0
  296. data/doc/classes/Imlib2/Image.src/M000246.html +24 -0
  297. data/doc/classes/Imlib2/Image.src/M000247.html +24 -0
  298. data/doc/classes/Imlib2/Image.src/M000248.html +23 -0
  299. data/doc/classes/Imlib2/Image.src/M000249.html +23 -0
  300. data/doc/classes/Imlib2/Image.src/M000250.html +24 -0
  301. data/doc/classes/Imlib2/Image.src/M000251.html +24 -0
  302. data/doc/classes/Imlib2/Image.src/M000252.html +30 -0
  303. data/doc/classes/Imlib2/Image.src/M000253.html +30 -0
  304. data/doc/classes/Imlib2/Image.src/M000254.html +25 -0
  305. data/doc/classes/Imlib2/Image.src/M000255.html +25 -0
  306. data/doc/classes/Imlib2/Image.src/M000256.html +24 -0
  307. data/doc/classes/Imlib2/Image.src/M000257.html +24 -0
  308. data/doc/classes/Imlib2/Image.src/M000258.html +23 -0
  309. data/doc/classes/Imlib2/Image.src/M000259.html +23 -0
  310. data/doc/classes/Imlib2/Image.src/M000260.html +24 -0
  311. data/doc/classes/Imlib2/Image.src/M000261.html +24 -0
  312. data/doc/classes/Imlib2/Image.src/M000262.html +24 -0
  313. data/doc/classes/Imlib2/Image.src/M000263.html +24 -0
  314. data/doc/classes/Imlib2/Image.src/M000264.html +24 -0
  315. data/doc/classes/Imlib2/Image.src/M000265.html +24 -0
  316. data/doc/classes/Imlib2/Image.src/M000266.html +24 -0
  317. data/doc/classes/Imlib2/Image.src/M000267.html +24 -0
  318. data/doc/classes/Imlib2/Image.src/M000268.html +24 -0
  319. data/doc/classes/Imlib2/Image.src/M000269.html +24 -0
  320. data/doc/classes/Imlib2/Image.src/M000270.html +24 -0
  321. data/doc/classes/Imlib2/Image.src/M000271.html +24 -0
  322. data/doc/classes/Imlib2/Image.src/M000272.html +24 -0
  323. data/doc/classes/Imlib2/Image.src/M000273.html +24 -0
  324. data/doc/classes/Imlib2/Image.src/M000274.html +24 -0
  325. data/doc/classes/Imlib2/Image.src/M000275.html +24 -0
  326. data/doc/classes/Imlib2/Image.src/M000276.html +24 -0
  327. data/doc/classes/Imlib2/Image.src/M000277.html +24 -0
  328. data/doc/classes/Imlib2/Image.src/M000278.html +24 -0
  329. data/doc/classes/Imlib2/Image.src/M000279.html +24 -0
  330. data/doc/classes/Imlib2/Image.src/M000280.html +24 -0
  331. data/doc/classes/Imlib2/Image.src/M000281.html +24 -0
  332. data/doc/classes/Imlib2/Image.src/M000282.html +24 -0
  333. data/doc/classes/Imlib2/Image.src/M000283.html +24 -0
  334. data/doc/classes/Imlib2/Image.src/M000284.html +33 -0
  335. data/doc/classes/Imlib2/Image.src/M000285.html +33 -0
  336. data/doc/classes/Imlib2/Image.src/M000286.html +33 -0
  337. data/doc/classes/Imlib2/Image.src/M000287.html +33 -0
  338. data/doc/classes/Imlib2/Image.src/M000288.html +41 -0
  339. data/doc/classes/Imlib2/Image.src/M000289.html +41 -0
  340. data/doc/classes/Imlib2/Image.src/M000290.html +41 -0
  341. data/doc/classes/Imlib2/Image.src/M000291.html +41 -0
  342. data/doc/classes/Imlib2/Image.src/M000292.html +23 -0
  343. data/doc/classes/Imlib2/Image.src/M000293.html +23 -0
  344. data/doc/classes/Imlib2/Image.src/M000294.html +23 -0
  345. data/doc/classes/Imlib2/Image.src/M000295.html +23 -0
  346. data/doc/classes/Imlib2/Image.src/M000296.html +23 -0
  347. data/doc/classes/Imlib2/Image.src/M000297.html +23 -0
  348. data/doc/classes/Imlib2/Image.src/M000298.html +24 -0
  349. data/doc/classes/Imlib2/Image.src/M000299.html +24 -0
  350. data/doc/classes/Imlib2/Image.src/M000300.html +24 -0
  351. data/doc/classes/Imlib2/Image.src/M000301.html +24 -0
  352. data/doc/classes/Imlib2/Image.src/M000302.html +24 -0
  353. data/doc/classes/Imlib2/Image.src/M000303.html +24 -0
  354. data/doc/classes/Imlib2/Image.src/M000304.html +23 -0
  355. data/doc/classes/Imlib2/Image.src/M000305.html +23 -0
  356. data/doc/classes/Imlib2/Image.src/M000306.html +23 -0
  357. data/doc/classes/Imlib2/Image.src/M000307.html +23 -0
  358. data/doc/classes/Imlib2/Image.src/M000308.html +23 -0
  359. data/doc/classes/Imlib2/Image.src/M000309.html +23 -0
  360. data/doc/classes/Imlib2/Image.src/M000310.html +30 -0
  361. data/doc/classes/Imlib2/Image.src/M000311.html +34 -0
  362. data/doc/classes/Imlib2/Image.src/M000313.html +32 -0
  363. data/doc/classes/Imlib2/Image.src/M000314.html +32 -0
  364. data/doc/classes/Imlib2/Image.src/M000315.html +32 -0
  365. data/doc/classes/Imlib2/Image.src/M000316.html +32 -0
  366. data/doc/classes/Imlib2/Image.src/M000317.html +24 -0
  367. data/doc/classes/Imlib2/Image.src/M000318.html +33 -0
  368. data/doc/classes/Imlib2/Image.src/M000319.html +32 -0
  369. data/doc/classes/Imlib2/Image.src/M000320.html +32 -0
  370. data/doc/classes/Imlib2/Image.src/M000321.html +30 -0
  371. data/doc/classes/Imlib2/Image.src/M000322.html +30 -0
  372. data/doc/classes/Imlib2/Image.src/M000323.html +30 -0
  373. data/doc/classes/Imlib2/Image.src/M000324.html +30 -0
  374. data/doc/classes/Imlib2/Image.src/M000325.html +48 -0
  375. data/doc/classes/Imlib2/Image.src/M000326.html +28 -0
  376. data/doc/classes/Imlib2/Image.src/M000327.html +28 -0
  377. data/doc/classes/Imlib2/Image.src/M000328.html +28 -0
  378. data/doc/classes/Imlib2/Image.src/M000329.html +28 -0
  379. data/doc/classes/Imlib2/Image.src/M000330.html +29 -0
  380. data/doc/classes/Imlib2/Image.src/M000331.html +29 -0
  381. data/doc/classes/Imlib2/Image.src/M000332.html +25 -0
  382. data/doc/classes/Imlib2/Image.src/M000333.html +25 -0
  383. data/doc/classes/Imlib2/Image.src/M000334.html +43 -0
  384. data/doc/classes/Imlib2/Image.src/M000335.html +43 -0
  385. data/doc/classes/Imlib2/Image.src/M000336.html +44 -0
  386. data/doc/classes/Imlib2/Image.src/M000337.html +44 -0
  387. data/doc/classes/Imlib2/Image.src/M000338.html +23 -0
  388. data/doc/classes/Imlib2/Image.src/M000339.html +23 -0
  389. data/doc/classes/Imlib2/Image.src/M000340.html +24 -0
  390. data/doc/classes/Imlib2/Image.src/M000341.html +24 -0
  391. data/doc/classes/Imlib2/Image.src/M000342.html +23 -0
  392. data/doc/classes/Imlib2/Image.src/M000343.html +21 -0
  393. data/doc/classes/Imlib2/Image.src/M000344.html +21 -0
  394. data/doc/classes/Imlib2/Image.src/M000345.html +31 -0
  395. data/doc/classes/Imlib2/Image.src/M000346.html +31 -0
  396. data/doc/classes/Imlib2/Image.src/M000347.html +28 -0
  397. data/doc/classes/Imlib2/Image.src/M000348.html +28 -0
  398. data/doc/classes/Imlib2/Image.src/M000349.html +32 -0
  399. data/doc/classes/Imlib2/Image.src/M000350.html +32 -0
  400. data/doc/classes/Imlib2/Image.src/M000351.html +32 -0
  401. data/doc/classes/Imlib2/Image.src/M000352.html +23 -0
  402. data/doc/classes/Imlib2/Image.src/M000353.html +23 -0
  403. data/doc/classes/Imlib2/Image.src/M000354.html +22 -0
  404. data/doc/classes/Imlib2/Image.src/M000355.html +23 -0
  405. data/doc/classes/Imlib2/Image.src/M000356.html +23 -0
  406. data/doc/classes/Imlib2/Op.html +134 -0
  407. data/doc/classes/Imlib2/Operation.html +134 -0
  408. data/doc/classes/Imlib2/Polygon.html +304 -0
  409. data/doc/classes/Imlib2/Polygon.src/M000114.html +26 -0
  410. data/doc/classes/Imlib2/Polygon.src/M000115.html +22 -0
  411. data/doc/classes/Imlib2/Polygon.src/M000116.html +23 -0
  412. data/doc/classes/Imlib2/Polygon.src/M000117.html +24 -0
  413. data/doc/classes/Imlib2/Polygon.src/M000118.html +24 -0
  414. data/doc/classes/Imlib2/Polygon.src/M000119.html +27 -0
  415. data/doc/classes/Imlib2/Polygon.src/M000120.html +27 -0
  416. data/doc/created.rid +1 -0
  417. data/doc/files/AUTHORS.html +213 -0
  418. data/doc/files/COPYING.html +132 -0
  419. data/doc/files/ChangeLog.html +844 -0
  420. data/doc/files/README.html +201 -0
  421. data/doc/files/TODO.html +141 -0
  422. data/doc/files/imlib2_c.html +102 -0
  423. data/doc/fr_class_index.html +49 -0
  424. data/doc/fr_file_index.html +32 -0
  425. data/doc/fr_method_index.html +448 -0
  426. data/doc/index.html +24 -0
  427. data/doc/rdoc-style.css +208 -0
  428. data/examples/checkerboard.rb +66 -0
  429. data/examples/fonts/yudit.ttf +0 -0
  430. data/examples/images/bill_gates.jpg +0 -0
  431. data/examples/images/clown.jpg +0 -0
  432. data/examples/oo-board.rb +90 -0
  433. data/examples/test_attach.rb +23 -0
  434. data/examples/test_font.rb +77 -0
  435. data/examples/test_imlib2.rb +121 -0
  436. data/examples/test_poly.rb +29 -0
  437. data/extconf.rb +22 -0
  438. data/imlib2.c +8183 -0
  439. data/imlib2.gemspec +39 -0
  440. metadata +494 -0
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (Imlib2::Gradient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre>/*
14
+ * Return a new Imlib2::Gradient.
15
+ *
16
+ * Examples:
17
+ * # create a blue to green gradient
18
+ * grad = Imlib2::Gradient.new
19
+ * grad.add_color 0, Imlib2::Color::BLUE
20
+ * grad.add_color 100, Imlib2::Color::GREEN
21
+ *
22
+ * # create a red to yellow to black gradient
23
+ * colors = [ [0, Imlib2::Color::RED ],
24
+ * [100, Imlib2::Color::YELLOW ],
25
+ * [200, Imlib2::Color::BLACK ] ]
26
+ * grad = Imlib2::Gradient.new *colors
27
+ *
28
+ */
29
+ VALUE gradient_new(int argc, VALUE *argv, VALUE klass) {
30
+ </pre>
31
+ </body>
32
+ </html>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (Imlib2::Gradient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre>/*
14
+ * Imlib2::Gradient constructor.
15
+ *
16
+ * Accepts an arbitrary number of arrays of offset, and color values
17
+ * (the same as Imlib2::Gradient.new).
18
+ *
19
+ */
20
+ static VALUE gradient_init(int argc, VALUE *argv, VALUE self) {
21
+ </pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>add_color (Imlib2::Gradient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre>/*
14
+ * Add a color at the given distance
15
+ *
16
+ * Examples:
17
+ * # add the context color with a 100 pixel offset
18
+ * grad.add_color 100
19
+ *
20
+ * # add white at a 100 pixel offset
21
+ * grad.add_color 100, Imlib2::Color::WHITE
22
+ *
23
+ */
24
+ static VALUE gradient_add_color(int argc, VALUE *argv, VALUE self) {
25
+ </pre>
26
+ </body>
27
+ </html>
@@ -0,0 +1,4005 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Imlib2::Image</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Imlib2::Image</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/imlib2_c.html">
59
+ imlib2.c
60
+ </a>
61
+ &nbsp;(<a href="http://cvs.pablotron.org/cgi-bin/viewcvs.cgi/imlib2-ruby/imlib2.c">CVS</a>)
62
+ <br />
63
+ </td>
64
+ </tr>
65
+
66
+ <tr class="top-aligned-row">
67
+ <td><strong>Parent:</strong></td>
68
+ <td>
69
+ Object
70
+ </td>
71
+ </tr>
72
+ </table>
73
+ </div>
74
+ <!-- banner header -->
75
+
76
+ <div id="bodyContent">
77
+
78
+
79
+
80
+ <div id="contextContent">
81
+
82
+
83
+
84
+ </div>
85
+
86
+ <div id="method-list">
87
+ <h3 class="section-bar">Methods</h3>
88
+
89
+ <div class="name-list">
90
+ <a href="#M000355">[]</a>&nbsp;&nbsp;
91
+ <a href="#M000356">[]=</a>&nbsp;&nbsp;
92
+ <a href="#M000351">apply</a>&nbsp;&nbsp;
93
+ <a href="#M000350">apply_cmod</a>&nbsp;&nbsp;
94
+ <a href="#M000349">apply_color_modifier</a>&nbsp;&nbsp;
95
+ <a href="#M000346">apply_filter</a>&nbsp;&nbsp;
96
+ <a href="#M000352">attach_value</a>&nbsp;&nbsp;
97
+ <a href="#M000336">blend</a>&nbsp;&nbsp;
98
+ <a href="#M000334">blend!</a>&nbsp;&nbsp;
99
+ <a href="#M000363">blend_drawable</a>&nbsp;&nbsp;
100
+ <a href="#M000337">blend_image</a>&nbsp;&nbsp;
101
+ <a href="#M000335">blend_image!</a>&nbsp;&nbsp;
102
+ <a href="#M000300">blur</a>&nbsp;&nbsp;
103
+ <a href="#M000301">blur!</a>&nbsp;&nbsp;
104
+ <a href="#M000260">border</a>&nbsp;&nbsp;
105
+ <a href="#M000262">border=</a>&nbsp;&nbsp;
106
+ <a href="#M000230">bypass_draw_pixel=</a>&nbsp;&nbsp;
107
+ <a href="#M000228">bypass_draw_pixel?</a>&nbsp;&nbsp;
108
+ <a href="#M000258">changes_on_disk</a>&nbsp;&nbsp;
109
+ <a href="#M000342">clear</a>&nbsp;&nbsp;
110
+ <a href="#M000343">clear_color</a>&nbsp;&nbsp;
111
+ <a href="#M000344">clear_color!</a>&nbsp;&nbsp;
112
+ <a href="#M000312">clip_line</a>&nbsp;&nbsp;
113
+ <a href="#M000340">clone</a>&nbsp;&nbsp;
114
+ <a href="#M000328">color_range</a>&nbsp;&nbsp;
115
+ <a href="#M000317">copy_alpha</a>&nbsp;&nbsp;
116
+ <a href="#M000318">copy_alpha_rect</a>&nbsp;&nbsp;
117
+ <a href="#M000362">copy_drawable</a>&nbsp;&nbsp;
118
+ <a href="#M000320">copy_rect</a>&nbsp;&nbsp;
119
+ <a href="#M000231">create</a>&nbsp;&nbsp;
120
+ <a href="#M000285">create_cropped</a>&nbsp;&nbsp;
121
+ <a href="#M000287">create_cropped!</a>&nbsp;&nbsp;
122
+ <a href="#M000289">create_cropped_scaled</a>&nbsp;&nbsp;
123
+ <a href="#M000291">create_cropped_scaled!</a>&nbsp;&nbsp;
124
+ <a href="#M000360">create_from_drawable</a>&nbsp;&nbsp;
125
+ <a href="#M000361">create_from_ximage</a>&nbsp;&nbsp;
126
+ <a href="#M000233">create_using_copied_data</a>&nbsp;&nbsp;
127
+ <a href="#M000232">create_using_data</a>&nbsp;&nbsp;
128
+ <a href="#M000284">crop</a>&nbsp;&nbsp;
129
+ <a href="#M000286">crop!</a>&nbsp;&nbsp;
130
+ <a href="#M000288">crop_scaled</a>&nbsp;&nbsp;
131
+ <a href="#M000290">crop_scaled!</a>&nbsp;&nbsp;
132
+ <a href="#M000249">data</a>&nbsp;&nbsp;
133
+ <a href="#M000251">data!</a>&nbsp;&nbsp;
134
+ <a href="#M000252">data=</a>&nbsp;&nbsp;
135
+ <a href="#M000250">data_for_reading_only</a>&nbsp;&nbsp;
136
+ <a href="#M000243">delete!</a>&nbsp;&nbsp;
137
+ <a href="#M000321">draw_ellipse</a>&nbsp;&nbsp;
138
+ <a href="#M000311">draw_line</a>&nbsp;&nbsp;
139
+ <a href="#M000322">draw_oval</a>&nbsp;&nbsp;
140
+ <a href="#M000310">draw_pixel</a>&nbsp;&nbsp;
141
+ <a href="#M000229">draw_pixel_workaround=</a>&nbsp;&nbsp;
142
+ <a href="#M000227">draw_pixel_workaround?</a>&nbsp;&nbsp;
143
+ <a href="#M000330">draw_poly</a>&nbsp;&nbsp;
144
+ <a href="#M000331">draw_polygon</a>&nbsp;&nbsp;
145
+ <a href="#M000313">draw_rect</a>&nbsp;&nbsp;
146
+ <a href="#M000314">draw_rectangle</a>&nbsp;&nbsp;
147
+ <a href="#M000325">draw_text</a>&nbsp;&nbsp;
148
+ <a href="#M000341">dup</a>&nbsp;&nbsp;
149
+ <a href="#M000248">filename</a>&nbsp;&nbsp;
150
+ <a href="#M000329">fill_color_range</a>&nbsp;&nbsp;
151
+ <a href="#M000323">fill_ellipse</a>&nbsp;&nbsp;
152
+ <a href="#M000327">fill_gradient</a>&nbsp;&nbsp;
153
+ <a href="#M000324">fill_oval</a>&nbsp;&nbsp;
154
+ <a href="#M000332">fill_poly</a>&nbsp;&nbsp;
155
+ <a href="#M000333">fill_polygon</a>&nbsp;&nbsp;
156
+ <a href="#M000315">fill_rect</a>&nbsp;&nbsp;
157
+ <a href="#M000316">fill_rectangle</a>&nbsp;&nbsp;
158
+ <a href="#M000345">filter</a>&nbsp;&nbsp;
159
+ <a href="#M000296">flip_diagonal</a>&nbsp;&nbsp;
160
+ <a href="#M000297">flip_diagonal!</a>&nbsp;&nbsp;
161
+ <a href="#M000292">flip_horizontal</a>&nbsp;&nbsp;
162
+ <a href="#M000293">flip_horizontal!</a>&nbsp;&nbsp;
163
+ <a href="#M000294">flip_vertical</a>&nbsp;&nbsp;
164
+ <a href="#M000295">flip_vertical!</a>&nbsp;&nbsp;
165
+ <a href="#M000264">format</a>&nbsp;&nbsp;
166
+ <a href="#M000266">format=</a>&nbsp;&nbsp;
167
+ <a href="#M000353">get_attached_value</a>&nbsp;&nbsp;
168
+ <a href="#M000261">get_border</a>&nbsp;&nbsp;
169
+ <a href="#M000265">get_format</a>&nbsp;&nbsp;
170
+ <a href="#M000326">gradient</a>&nbsp;&nbsp;
171
+ <a href="#M000247">h</a>&nbsp;&nbsp;
172
+ <a href="#M000254">has_alpha</a>&nbsp;&nbsp;
173
+ <a href="#M000256">has_alpha=</a>&nbsp;&nbsp;
174
+ <a href="#M000255">has_alpha?</a>&nbsp;&nbsp;
175
+ <a href="#M000246">height</a>&nbsp;&nbsp;
176
+ <a href="#M000272">irrelevant_alpha=</a>&nbsp;&nbsp;
177
+ <a href="#M000270">irrelevant_border=</a>&nbsp;&nbsp;
178
+ <a href="#M000268">irrelevant_format=</a>&nbsp;&nbsp;
179
+ <a href="#M000234">load</a>&nbsp;&nbsp;
180
+ <a href="#M000235">load_image</a>&nbsp;&nbsp;
181
+ <a href="#M000236">load_immediately</a>&nbsp;&nbsp;
182
+ <a href="#M000238">load_immediately_without_cache</a>&nbsp;&nbsp;
183
+ <a href="#M000239">load_with_error_return</a>&nbsp;&nbsp;
184
+ <a href="#M000237">load_without_cache</a>&nbsp;&nbsp;
185
+ <a href="#M000225">new</a>&nbsp;&nbsp;
186
+ <a href="#M000226">new</a>&nbsp;&nbsp;
187
+ <a href="#M000298">orientate</a>&nbsp;&nbsp;
188
+ <a href="#M000299">orientate!</a>&nbsp;&nbsp;
189
+ <a href="#M000274">pixel</a>&nbsp;&nbsp;
190
+ <a href="#M000282">pixel_cmya</a>&nbsp;&nbsp;
191
+ <a href="#M000280">pixel_hlsa</a>&nbsp;&nbsp;
192
+ <a href="#M000278">pixel_hsva</a>&nbsp;&nbsp;
193
+ <a href="#M000275">pixel_rgba</a>&nbsp;&nbsp;
194
+ <a href="#M000358">pixmap</a>&nbsp;&nbsp;
195
+ <a href="#M000253">put_back_data</a>&nbsp;&nbsp;
196
+ <a href="#M000276">query_pixel</a>&nbsp;&nbsp;
197
+ <a href="#M000283">query_pixel_cmya</a>&nbsp;&nbsp;
198
+ <a href="#M000281">query_pixel_hlsa</a>&nbsp;&nbsp;
199
+ <a href="#M000279">query_pixel_hsva</a>&nbsp;&nbsp;
200
+ <a href="#M000277">query_pixel_rgba</a>&nbsp;&nbsp;
201
+ <a href="#M000354">remove_attached_value</a>&nbsp;&nbsp;
202
+ <a href="#M000359">render_on_drawable</a>&nbsp;&nbsp;
203
+ <a href="#M000365">render_on_drawable_at_angle</a>&nbsp;&nbsp;
204
+ <a href="#M000364">render_on_drawable_skewed</a>&nbsp;&nbsp;
205
+ <a href="#M000357">render_pixmap</a>&nbsp;&nbsp;
206
+ <a href="#M000338">rotate</a>&nbsp;&nbsp;
207
+ <a href="#M000339">rotate!</a>&nbsp;&nbsp;
208
+ <a href="#M000240">save</a>&nbsp;&nbsp;
209
+ <a href="#M000241">save_image</a>&nbsp;&nbsp;
210
+ <a href="#M000242">save_with_error_return</a>&nbsp;&nbsp;
211
+ <a href="#M000348">script_filter</a>&nbsp;&nbsp;
212
+ <a href="#M000319">scroll_rect</a>&nbsp;&nbsp;
213
+ <a href="#M000263">set_border</a>&nbsp;&nbsp;
214
+ <a href="#M000259">set_changes_on_disk</a>&nbsp;&nbsp;
215
+ <a href="#M000267">set_format</a>&nbsp;&nbsp;
216
+ <a href="#M000257">set_has_alpha</a>&nbsp;&nbsp;
217
+ <a href="#M000273">set_irrelevant_alpha</a>&nbsp;&nbsp;
218
+ <a href="#M000271">set_irrelevant_border</a>&nbsp;&nbsp;
219
+ <a href="#M000269">set_irrelevant_format</a>&nbsp;&nbsp;
220
+ <a href="#M000302">sharpen</a>&nbsp;&nbsp;
221
+ <a href="#M000303">sharpen!</a>&nbsp;&nbsp;
222
+ <a href="#M000347">static_filter</a>&nbsp;&nbsp;
223
+ <a href="#M000308">tile</a>&nbsp;&nbsp;
224
+ <a href="#M000309">tile!</a>&nbsp;&nbsp;
225
+ <a href="#M000304">tile_horizontal</a>&nbsp;&nbsp;
226
+ <a href="#M000305">tile_horizontal!</a>&nbsp;&nbsp;
227
+ <a href="#M000306">tile_vertical</a>&nbsp;&nbsp;
228
+ <a href="#M000307">tile_vertical!</a>&nbsp;&nbsp;
229
+ <a href="#M000245">w</a>&nbsp;&nbsp;
230
+ <a href="#M000244">width</a>&nbsp;&nbsp;
231
+ </div>
232
+ </div>
233
+
234
+ </div>
235
+
236
+
237
+ <!-- if includes -->
238
+
239
+ <div id="section">
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <!-- if method_list -->
249
+ <div id="methods">
250
+ <h3 class="section-bar">Public Class methods</h3>
251
+
252
+ <div id="method-M000230" class="method-detail">
253
+ <a name="M000230"></a>
254
+
255
+ <div class="method-heading">
256
+ <a href="Image.src/M000230.html" target="Code" class="method-signature"
257
+ onclick="popupCode('Image.src/M000230.html');return false;">
258
+ <span class="method-name">bypass_draw_pixel=</span><span class="method-args">(p1)</span>
259
+ </a>
260
+ </div>
261
+
262
+ <div class="method-description">
263
+ <p>
264
+ Are we using the buggy imlib_image_draw_pixel() work-around?
265
+ </p>
266
+ <p>
267
+ Versions of <a href="../Imlib2.html">Imlib2</a> up to and including 1.0.5
268
+ had a broken imlib_image_draw_pixel() call. <a
269
+ href="../Imlib2.html">Imlib2</a>-Ruby has a work-around, which simulates
270
+ drawing a pixel with a 1x1 rectangle. This method allows you to check
271
+ whether the work-around behavior is enabled.
272
+ </p>
273
+ <p>
274
+ Examples:
275
+ </p>
276
+ <pre>
277
+ puts 'work-around is enabled' if Imlib2::Image::draw_pixel_workaround?
278
+ puts 'work-around is enabled' if Imlib2::Image::bypass_draw_pixel?
279
+ </pre>
280
+ </div>
281
+ </div>
282
+
283
+ <div id="method-M000228" class="method-detail">
284
+ <a name="M000228"></a>
285
+
286
+ <div class="method-heading">
287
+ <a href="Image.src/M000228.html" target="Code" class="method-signature"
288
+ onclick="popupCode('Image.src/M000228.html');return false;">
289
+ <span class="method-name">bypass_draw_pixel?</span><span class="method-args">()</span>
290
+ </a>
291
+ </div>
292
+
293
+ <div class="method-description">
294
+ <p>
295
+ Are we using the buggy imlib_image_draw_pixel() work-around?
296
+ </p>
297
+ <p>
298
+ Versions of <a href="../Imlib2.html">Imlib2</a> up to and including 1.0.5
299
+ had a broken imlib_image_draw_pixel() call. <a
300
+ href="../Imlib2.html">Imlib2</a>-Ruby has a work-around, which simulates
301
+ drawing a pixel with a 1x1 rectangle. This method allows you to check
302
+ whether the work-around behavior is enabled.
303
+ </p>
304
+ <p>
305
+ Examples:
306
+ </p>
307
+ <pre>
308
+ puts 'work-around is enabled' if Imlib2::Image::draw_pixel_workaround?
309
+ puts 'work-around is enabled' if Imlib2::Image::bypass_draw_pixel?
310
+ </pre>
311
+ </div>
312
+ </div>
313
+
314
+ <div id="method-M000231" class="method-detail">
315
+ <a name="M000231"></a>
316
+
317
+ <div class="method-heading">
318
+ <a href="Image.src/M000231.html" target="Code" class="method-signature"
319
+ onclick="popupCode('Image.src/M000231.html');return false;">
320
+ <span class="method-name">create</span><span class="method-args">(p1, p2)</span>
321
+ </a>
322
+ </div>
323
+
324
+ <div class="method-description">
325
+ <p>
326
+ Returns a new <a href="Image.html">Imlib2::Image</a> with the specified
327
+ width and height.
328
+ </p>
329
+ <p>
330
+ Examples:
331
+ </p>
332
+ <pre>
333
+ width, height = 640, 480
334
+ image = Imlib2::Image.new width, height
335
+
336
+ width, height = 320, 240
337
+ image = Imlib2::Image.create width, height
338
+ </pre>
339
+ </div>
340
+ </div>
341
+
342
+ <div id="method-M000360" class="method-detail">
343
+ <a name="M000360"></a>
344
+
345
+ <div class="method-heading">
346
+ <span class="method-name">create_from_drawable</span><span class="method-args">(...)</span>
347
+ </div>
348
+
349
+ <div class="method-description">
350
+ </div>
351
+ </div>
352
+
353
+ <div id="method-M000361" class="method-detail">
354
+ <a name="M000361"></a>
355
+
356
+ <div class="method-heading">
357
+ <span class="method-name">create_from_ximage</span><span class="method-args">(...)</span>
358
+ </div>
359
+
360
+ <div class="method-description">
361
+ </div>
362
+ </div>
363
+
364
+ <div id="method-M000233" class="method-detail">
365
+ <a name="M000233"></a>
366
+
367
+ <div class="method-heading">
368
+ <a href="Image.src/M000233.html" target="Code" class="method-signature"
369
+ onclick="popupCode('Image.src/M000233.html');return false;">
370
+ <span class="method-name">create_using_copied_data</span><span class="method-args">(p1, p2, p3)</span>
371
+ </a>
372
+ </div>
373
+
374
+ <div class="method-description">
375
+ <p>
376
+ Returns a new <a href="Image.html">Imlib2::Image</a> initialized with the
377
+ specified data.
378
+ </p>
379
+ <p>
380
+ Examples:
381
+ </p>
382
+ <pre>
383
+ other_image = Imlib2::Image.load 'sample_file.png'
384
+ width, height = other_image.width, other_image.height
385
+ data = other_image.data
386
+ image = Imlib2::Image.create_using_copied_data width, height, data
387
+ </pre>
388
+ </div>
389
+ </div>
390
+
391
+ <div id="method-M000232" class="method-detail">
392
+ <a name="M000232"></a>
393
+
394
+ <div class="method-heading">
395
+ <a href="Image.src/M000232.html" target="Code" class="method-signature"
396
+ onclick="popupCode('Image.src/M000232.html');return false;">
397
+ <span class="method-name">create_using_data</span><span class="method-args">(p1, p2, p3)</span>
398
+ </a>
399
+ </div>
400
+
401
+ <div class="method-description">
402
+ <p>
403
+ Returns a new <a href="Image.html">Imlib2::Image</a> initialized with the
404
+ specified data.
405
+ </p>
406
+ <p>
407
+ Examples:
408
+ </p>
409
+ <pre>
410
+ other_image = Imlib2::Image.load 'sample_file.png'
411
+ width, height = other_image.width, other_image.height
412
+ data = other_image.data_for_reading_only
413
+ image = Imlib2::Image.create_using_data width, height, data
414
+ </pre>
415
+ </div>
416
+ </div>
417
+
418
+ <div id="method-M000229" class="method-detail">
419
+ <a name="M000229"></a>
420
+
421
+ <div class="method-heading">
422
+ <a href="Image.src/M000229.html" target="Code" class="method-signature"
423
+ onclick="popupCode('Image.src/M000229.html');return false;">
424
+ <span class="method-name">draw_pixel_workaround=</span><span class="method-args">(p1)</span>
425
+ </a>
426
+ </div>
427
+
428
+ <div class="method-description">
429
+ <p>
430
+ Are we using the buggy imlib_image_draw_pixel() work-around?
431
+ </p>
432
+ <p>
433
+ Versions of <a href="../Imlib2.html">Imlib2</a> up to and including 1.0.5
434
+ had a broken imlib_image_draw_pixel() call. <a
435
+ href="../Imlib2.html">Imlib2</a>-Ruby has a work-around, which simulates
436
+ drawing a pixel with a 1x1 rectangle. This method allows you to check
437
+ whether the work-around behavior is enabled.
438
+ </p>
439
+ <p>
440
+ Examples:
441
+ </p>
442
+ <pre>
443
+ puts 'work-around is enabled' if Imlib2::Image::draw_pixel_workaround?
444
+ puts 'work-around is enabled' if Imlib2::Image::bypass_draw_pixel?
445
+ </pre>
446
+ </div>
447
+ </div>
448
+
449
+ <div id="method-M000227" class="method-detail">
450
+ <a name="M000227"></a>
451
+
452
+ <div class="method-heading">
453
+ <a href="Image.src/M000227.html" target="Code" class="method-signature"
454
+ onclick="popupCode('Image.src/M000227.html');return false;">
455
+ <span class="method-name">draw_pixel_workaround?</span><span class="method-args">()</span>
456
+ </a>
457
+ </div>
458
+
459
+ <div class="method-description">
460
+ <p>
461
+ Are we using the buggy imlib_image_draw_pixel() work-around?
462
+ </p>
463
+ <p>
464
+ Versions of <a href="../Imlib2.html">Imlib2</a> up to and including 1.0.5
465
+ had a broken imlib_image_draw_pixel() call. <a
466
+ href="../Imlib2.html">Imlib2</a>-Ruby has a work-around, which simulates
467
+ drawing a pixel with a 1x1 rectangle. This method allows you to check
468
+ whether the work-around behavior is enabled.
469
+ </p>
470
+ <p>
471
+ Examples:
472
+ </p>
473
+ <pre>
474
+ puts 'work-around is enabled' if Imlib2::Image::draw_pixel_workaround?
475
+ puts 'work-around is enabled' if Imlib2::Image::bypass_draw_pixel?
476
+ </pre>
477
+ </div>
478
+ </div>
479
+
480
+ <div id="method-M000234" class="method-detail">
481
+ <a name="M000234"></a>
482
+
483
+ <div class="method-heading">
484
+ <a href="Image.src/M000234.html" target="Code" class="method-signature"
485
+ onclick="popupCode('Image.src/M000234.html');return false;">
486
+ <span class="method-name">load</span><span class="method-args">(p1)</span>
487
+ </a>
488
+ </div>
489
+
490
+ <div class="method-description">
491
+ <p>
492
+ Load an <a href="Image.html">Imlib2::Image</a> from a file (throws
493
+ exceptions).
494
+ </p>
495
+ <p>
496
+ Examples:
497
+ </p>
498
+ <pre>
499
+ image = Imlib2::Image.load 'sample_file.png'
500
+
501
+ begin
502
+ image = Imlib2::Image.load 'sample_file.png'
503
+ rescue Imlib2::FileError
504
+ $stderr.puts 'Couldn't load file: ' + $!
505
+ end
506
+ </pre>
507
+ </div>
508
+ </div>
509
+
510
+ <div id="method-M000235" class="method-detail">
511
+ <a name="M000235"></a>
512
+
513
+ <div class="method-heading">
514
+ <a href="Image.src/M000235.html" target="Code" class="method-signature"
515
+ onclick="popupCode('Image.src/M000235.html');return false;">
516
+ <span class="method-name">load_image</span><span class="method-args">(p1)</span>
517
+ </a>
518
+ </div>
519
+
520
+ <div class="method-description">
521
+ <p>
522
+ Load an <a href="Image.html">Imlib2::Image</a> from a file (no exceptions
523
+ or error).
524
+ </p>
525
+ <p>
526
+ Imlib2::Image::load_image() provides access to the low-level
527
+ imlib_load_image() function. You probably want to use Imlib2::Image::load()
528
+ instead of Imlib2::Image::load_image().
529
+ </p>
530
+ <p>
531
+ Examples:
532
+ </p>
533
+ <pre>
534
+ image = Imlib2::Image.load_image 'sample_file.png'
535
+ </pre>
536
+ </div>
537
+ </div>
538
+
539
+ <div id="method-M000236" class="method-detail">
540
+ <a name="M000236"></a>
541
+
542
+ <div class="method-heading">
543
+ <a href="Image.src/M000236.html" target="Code" class="method-signature"
544
+ onclick="popupCode('Image.src/M000236.html');return false;">
545
+ <span class="method-name">load_immediately</span><span class="method-args">(p1)</span>
546
+ </a>
547
+ </div>
548
+
549
+ <div class="method-description">
550
+ <p>
551
+ Load an <a href="Image.html">Imlib2::Image</a> from a file (no exceptions
552
+ or error).
553
+ </p>
554
+ <p>
555
+ Imlib2::Image::load_immediately() provides access to the low-level
556
+ imlib_load_image_immediately() function. You probably want to use
557
+ Imlib2::Image::load() instead of this function.
558
+ </p>
559
+ <p>
560
+ Examples:
561
+ </p>
562
+ <pre>
563
+ image = Imlib2::Image.load_immediately 'sample_file.png'
564
+ </pre>
565
+ </div>
566
+ </div>
567
+
568
+ <div id="method-M000238" class="method-detail">
569
+ <a name="M000238"></a>
570
+
571
+ <div class="method-heading">
572
+ <a href="Image.src/M000238.html" target="Code" class="method-signature"
573
+ onclick="popupCode('Image.src/M000238.html');return false;">
574
+ <span class="method-name">load_immediately_without_cache</span><span class="method-args">(p1)</span>
575
+ </a>
576
+ </div>
577
+
578
+ <div class="method-description">
579
+ <p>
580
+ Load an <a href="Image.html">Imlib2::Image</a> from a file (no caching,
581
+ deferred loading, exceptions, or errors).
582
+ </p>
583
+ <p>
584
+ Imlib2::Image::load_immediately_without_cache() provides access to the
585
+ low-level imlib_load_image_immediately_without_cache() function. You
586
+ probably want to use Imlib2::Image::load() instead of this function.
587
+ </p>
588
+ <p>
589
+ Examples:
590
+ </p>
591
+ <pre>
592
+ image = Imlib2::Image.load_immediately_without_cache 'sample_file.png'
593
+ </pre>
594
+ </div>
595
+ </div>
596
+
597
+ <div id="method-M000239" class="method-detail">
598
+ <a name="M000239"></a>
599
+
600
+ <div class="method-heading">
601
+ <a href="Image.src/M000239.html" target="Code" class="method-signature"
602
+ onclick="popupCode('Image.src/M000239.html');return false;">
603
+ <span class="method-name">load_with_error_return</span><span class="method-args">(p1)</span>
604
+ </a>
605
+ </div>
606
+
607
+ <div class="method-description">
608
+ <p>
609
+ Load an <a href="Image.html">Imlib2::Image</a> from a file with a hash of
610
+ the error value and the image.
611
+ </p>
612
+ <p>
613
+ Imlib2::Image::load_with_error_return() provides access to the low-level
614
+ imlib_load_image_with_error_return() function. You probably want to use
615
+ Imlib2::Image::load() instead of this function.
616
+ </p>
617
+ <p>
618
+ Examples:
619
+ </p>
620
+ <pre>
621
+ hash = Imlib2::Image.load_with_error_return 'sample_file.png'
622
+ if hash['error'] == 0 # 0 is no error
623
+ image = hash['image']
624
+ end
625
+ </pre>
626
+ </div>
627
+ </div>
628
+
629
+ <div id="method-M000237" class="method-detail">
630
+ <a name="M000237"></a>
631
+
632
+ <div class="method-heading">
633
+ <a href="Image.src/M000237.html" target="Code" class="method-signature"
634
+ onclick="popupCode('Image.src/M000237.html');return false;">
635
+ <span class="method-name">load_without_cache</span><span class="method-args">(p1)</span>
636
+ </a>
637
+ </div>
638
+
639
+ <div class="method-description">
640
+ <p>
641
+ Load an <a href="Image.html">Imlib2::Image</a> from a file (no caching,
642
+ exception, or error).
643
+ </p>
644
+ <p>
645
+ Imlib2::Image::load_without_cache() provides access to the low-level
646
+ imlib_load_image_without_cache() function. You probably want to use
647
+ Imlib2::Image::load() instead of this function.
648
+ </p>
649
+ <p>
650
+ Examples:
651
+ </p>
652
+ <pre>
653
+ image = Imlib2::Image.load_without_cache 'sample_file.png'
654
+ </pre>
655
+ </div>
656
+ </div>
657
+
658
+ <div id="method-M000225" class="method-detail">
659
+ <a name="M000225"></a>
660
+
661
+ <div class="method-heading">
662
+ <a href="Image.src/M000225.html" target="Code" class="method-signature"
663
+ onclick="popupCode('Image.src/M000225.html');return false;">
664
+ <span class="method-name">new</span><span class="method-args">(p1, p2)</span>
665
+ </a>
666
+ </div>
667
+
668
+ <div class="method-description">
669
+ <p>
670
+ Returns a new <a href="Image.html">Imlib2::Image</a> with the specified
671
+ width and height.
672
+ </p>
673
+ <p>
674
+ Examples:
675
+ </p>
676
+ <pre>
677
+ width, height = 640, 480
678
+ image = Imlib2::Image.new width, height
679
+
680
+ width, height = 320, 240
681
+ image = Imlib2::Image.create width, height
682
+ </pre>
683
+ </div>
684
+ </div>
685
+
686
+ <div id="method-M000226" class="method-detail">
687
+ <a name="M000226"></a>
688
+
689
+ <div class="method-heading">
690
+ <a href="Image.src/M000226.html" target="Code" class="method-signature"
691
+ onclick="popupCode('Image.src/M000226.html');return false;">
692
+ <span class="method-name">new</span><span class="method-args">()</span>
693
+ </a>
694
+ </div>
695
+
696
+ <div class="method-description">
697
+ <p>
698
+ <a href="Image.html">Imlib2::Image</a> constructor (currently just an empty
699
+ placeholder).
700
+ </p>
701
+ </div>
702
+ </div>
703
+
704
+ <h3 class="section-bar">Public Instance methods</h3>
705
+
706
+ <div id="method-M000355" class="method-detail">
707
+ <a name="M000355"></a>
708
+
709
+ <div class="method-heading">
710
+ <a href="Image.src/M000355.html" target="Code" class="method-signature"
711
+ onclick="popupCode('Image.src/M000355.html');return false;">
712
+ <span class="method-name">[]</span><span class="method-args">(p1)</span>
713
+ </a>
714
+ </div>
715
+
716
+ <div class="method-description">
717
+ <p>
718
+ Get an integer value attached to an <a href="Image.html">Imlib2::Image</a>.
719
+ </p>
720
+ <p>
721
+ Examples:
722
+ </p>
723
+ <pre>
724
+ qual = image.get_attached_value('quality')
725
+ qual = image['quality']
726
+ </pre>
727
+ </div>
728
+ </div>
729
+
730
+ <div id="method-M000356" class="method-detail">
731
+ <a name="M000356"></a>
732
+
733
+ <div class="method-heading">
734
+ <a href="Image.src/M000356.html" target="Code" class="method-signature"
735
+ onclick="popupCode('Image.src/M000356.html');return false;">
736
+ <span class="method-name">[]=</span><span class="method-args">(p1, p2)</span>
737
+ </a>
738
+ </div>
739
+
740
+ <div class="method-description">
741
+ <p>
742
+ Attach an integer value to an <a href="Image.html">Imlib2::Image</a>.
743
+ </p>
744
+ <p>
745
+ Examples:
746
+ </p>
747
+ <pre>
748
+ image.attach_value('quality', 90)
749
+ image['quality'] = 90
750
+ </pre>
751
+ </div>
752
+ </div>
753
+
754
+ <div id="method-M000351" class="method-detail">
755
+ <a name="M000351"></a>
756
+
757
+ <div class="method-heading">
758
+ <a href="Image.src/M000351.html" target="Code" class="method-signature"
759
+ onclick="popupCode('Image.src/M000351.html');return false;">
760
+ <span class="method-name">apply</span><span class="method-args">(p1)</span>
761
+ </a>
762
+ </div>
763
+
764
+ <div class="method-description">
765
+ <p>
766
+ Apply an <a href="ColorModifier.html">Imlib2::ColorModifier</a> to the
767
+ image
768
+ </p>
769
+ <p>
770
+ Examples:
771
+ </p>
772
+ <pre>
773
+ # modify the contrast of the entire image
774
+ cmod = Imlib2::ColorModifier.new
775
+ cmod.contrast = 1.5
776
+ image.apply_cmod color_mod
777
+
778
+ # adjust the gamma of the given rect
779
+ cmod = Imlib2::ColorModifier.new
780
+ cmod.gamma = 0.5
781
+ rect = [10, 10, 20, 40]
782
+ image.apply_color_modifier cmod, rect
783
+ </pre>
784
+ </div>
785
+ </div>
786
+
787
+ <div id="method-M000350" class="method-detail">
788
+ <a name="M000350"></a>
789
+
790
+ <div class="method-heading">
791
+ <a href="Image.src/M000350.html" target="Code" class="method-signature"
792
+ onclick="popupCode('Image.src/M000350.html');return false;">
793
+ <span class="method-name">apply_cmod</span><span class="method-args">(p1)</span>
794
+ </a>
795
+ </div>
796
+
797
+ <div class="method-description">
798
+ <p>
799
+ Apply an <a href="ColorModifier.html">Imlib2::ColorModifier</a> to the
800
+ image
801
+ </p>
802
+ <p>
803
+ Examples:
804
+ </p>
805
+ <pre>
806
+ # modify the contrast of the entire image
807
+ cmod = Imlib2::ColorModifier.new
808
+ cmod.contrast = 1.5
809
+ image.apply_cmod color_mod
810
+
811
+ # adjust the gamma of the given rect
812
+ cmod = Imlib2::ColorModifier.new
813
+ cmod.gamma = 0.5
814
+ rect = [10, 10, 20, 40]
815
+ image.apply_color_modifier cmod, rect
816
+ </pre>
817
+ </div>
818
+ </div>
819
+
820
+ <div id="method-M000349" class="method-detail">
821
+ <a name="M000349"></a>
822
+
823
+ <div class="method-heading">
824
+ <a href="Image.src/M000349.html" target="Code" class="method-signature"
825
+ onclick="popupCode('Image.src/M000349.html');return false;">
826
+ <span class="method-name">apply_color_modifier</span><span class="method-args">(p1)</span>
827
+ </a>
828
+ </div>
829
+
830
+ <div class="method-description">
831
+ <p>
832
+ Apply an <a href="ColorModifier.html">Imlib2::ColorModifier</a> to the
833
+ image
834
+ </p>
835
+ <p>
836
+ Examples:
837
+ </p>
838
+ <pre>
839
+ # modify the contrast of the entire image
840
+ cmod = Imlib2::ColorModifier.new
841
+ cmod.contrast = 1.5
842
+ image.apply_cmod color_mod
843
+
844
+ # adjust the gamma of the given rect
845
+ cmod = Imlib2::ColorModifier.new
846
+ cmod.gamma = 0.5
847
+ rect = [10, 10, 20, 40]
848
+ image.apply_color_modifier cmod, rect
849
+ </pre>
850
+ </div>
851
+ </div>
852
+
853
+ <div id="method-M000346" class="method-detail">
854
+ <a name="M000346"></a>
855
+
856
+ <div class="method-heading">
857
+ <a href="Image.src/M000346.html" target="Code" class="method-signature"
858
+ onclick="popupCode('Image.src/M000346.html');return false;">
859
+ <span class="method-name">apply_filter</span><span class="method-args">(p1)</span>
860
+ </a>
861
+ </div>
862
+
863
+ <div class="method-description">
864
+ <p>
865
+ Apply a scripted filter or a static (eg <a
866
+ href="Filter.html">Imlib2::Filter</a>) filter
867
+ </p>
868
+ <p>
869
+ Example:
870
+ </p>
871
+ <pre>
872
+ # apply a static filter
873
+ filter = Imlib2::Filter.new 20
874
+ filter.set 2, 2, Imlib2::Color::GREEN
875
+ image.filter filter
876
+
877
+ # apply a scripted filter
878
+ x, y = 20, 10
879
+ filter_string = &quot;tint( x=#{x}, y=#{y}, red=255, alpha=55 );&quot;
880
+ image.filter filter_string
881
+ </pre>
882
+ </div>
883
+ </div>
884
+
885
+ <div id="method-M000352" class="method-detail">
886
+ <a name="M000352"></a>
887
+
888
+ <div class="method-heading">
889
+ <a href="Image.src/M000352.html" target="Code" class="method-signature"
890
+ onclick="popupCode('Image.src/M000352.html');return false;">
891
+ <span class="method-name">attach_value</span><span class="method-args">(p1, p2)</span>
892
+ </a>
893
+ </div>
894
+
895
+ <div class="method-description">
896
+ <p>
897
+ Attach an integer value to an <a href="Image.html">Imlib2::Image</a>.
898
+ </p>
899
+ <p>
900
+ Examples:
901
+ </p>
902
+ <pre>
903
+ image.attach_value('quality', 90)
904
+ image['quality'] = 90
905
+ </pre>
906
+ </div>
907
+ </div>
908
+
909
+ <div id="method-M000336" class="method-detail">
910
+ <a name="M000336"></a>
911
+
912
+ <div class="method-heading">
913
+ <a href="Image.src/M000336.html" target="Code" class="method-signature"
914
+ onclick="popupCode('Image.src/M000336.html');return false;">
915
+ <span class="method-name">blend</span><span class="method-args">(...)</span>
916
+ </a>
917
+ </div>
918
+
919
+ <div class="method-description">
920
+ <p>
921
+ Return a copy of the image with the a portion of the source image blended
922
+ at the specified rectangle.
923
+ </p>
924
+ <p>
925
+ Examples:
926
+ </p>
927
+ <pre>
928
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
929
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
930
+ image.blend source_image,
931
+ src_x, src_y, src_w, src_h,
932
+ dst_x, dst_y, dst_w, dst_h
933
+
934
+ src_rect = [50, 50, 5, 5]
935
+ dst_rect = [0, 0, image.width, image.height]
936
+ merge_alpha = false
937
+ image.blend source_image, src_rect, dst_rect, merge_alpha
938
+
939
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
940
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
941
+ image.blend_image source_image,
942
+ src_x, src_y, src_w, src_h,
943
+ dst_x, dst_y, dst_w, dst_h
944
+
945
+ src_rect = [50, 50, 5, 5]
946
+ dst_rect = [0, 0, image.width, image.height]
947
+ merge_alpha = false
948
+ image.blend_image source_image, src_rect, dst_rect, merge_alpha
949
+ </pre>
950
+ </div>
951
+ </div>
952
+
953
+ <div id="method-M000334" class="method-detail">
954
+ <a name="M000334"></a>
955
+
956
+ <div class="method-heading">
957
+ <a href="Image.src/M000334.html" target="Code" class="method-signature"
958
+ onclick="popupCode('Image.src/M000334.html');return false;">
959
+ <span class="method-name">blend!</span><span class="method-args">(...)</span>
960
+ </a>
961
+ </div>
962
+
963
+ <div class="method-description">
964
+ <p>
965
+ Blend a source image onto the image
966
+ </p>
967
+ <p>
968
+ Examples:
969
+ </p>
970
+ <pre>
971
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
972
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
973
+ image.blend! source_image,
974
+ src_x, src_y, src_w, src_h,
975
+ dst_x, dst_y, dst_w, dst_h
976
+
977
+ src_rect = [50, 50, 5, 5]
978
+ dst_rect = [0, 0, image.width, image.height]
979
+ merge_alpha = false
980
+ image.blend! source_image, src_rect, dst_rect, merge_alpha
981
+
982
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
983
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
984
+ image.blend_image! source_image,
985
+ src_x, src_y, src_w, src_h,
986
+ dst_x, dst_y, dst_w, dst_h
987
+
988
+ src_rect = [50, 50, 5, 5]
989
+ dst_rect = [0, 0, image.width, image.height]
990
+ merge_alpha = false
991
+ image.blend_image! source_image, src_rect, dst_rect, merge_alpha
992
+ </pre>
993
+ </div>
994
+ </div>
995
+
996
+ <div id="method-M000363" class="method-detail">
997
+ <a name="M000363"></a>
998
+
999
+ <div class="method-heading">
1000
+ <span class="method-name">blend_drawable</span><span class="method-args">(...)</span>
1001
+ </div>
1002
+
1003
+ <div class="method-description">
1004
+ </div>
1005
+ </div>
1006
+
1007
+ <div id="method-M000337" class="method-detail">
1008
+ <a name="M000337"></a>
1009
+
1010
+ <div class="method-heading">
1011
+ <a href="Image.src/M000337.html" target="Code" class="method-signature"
1012
+ onclick="popupCode('Image.src/M000337.html');return false;">
1013
+ <span class="method-name">blend_image</span><span class="method-args">(...)</span>
1014
+ </a>
1015
+ </div>
1016
+
1017
+ <div class="method-description">
1018
+ <p>
1019
+ Return a copy of the image with the a portion of the source image blended
1020
+ at the specified rectangle.
1021
+ </p>
1022
+ <p>
1023
+ Examples:
1024
+ </p>
1025
+ <pre>
1026
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
1027
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
1028
+ image.blend source_image,
1029
+ src_x, src_y, src_w, src_h,
1030
+ dst_x, dst_y, dst_w, dst_h
1031
+
1032
+ src_rect = [50, 50, 5, 5]
1033
+ dst_rect = [0, 0, image.width, image.height]
1034
+ merge_alpha = false
1035
+ image.blend source_image, src_rect, dst_rect, merge_alpha
1036
+
1037
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
1038
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
1039
+ image.blend_image source_image,
1040
+ src_x, src_y, src_w, src_h,
1041
+ dst_x, dst_y, dst_w, dst_h
1042
+
1043
+ src_rect = [50, 50, 5, 5]
1044
+ dst_rect = [0, 0, image.width, image.height]
1045
+ merge_alpha = false
1046
+ image.blend_image source_image, src_rect, dst_rect, merge_alpha
1047
+ </pre>
1048
+ </div>
1049
+ </div>
1050
+
1051
+ <div id="method-M000335" class="method-detail">
1052
+ <a name="M000335"></a>
1053
+
1054
+ <div class="method-heading">
1055
+ <a href="Image.src/M000335.html" target="Code" class="method-signature"
1056
+ onclick="popupCode('Image.src/M000335.html');return false;">
1057
+ <span class="method-name">blend_image!</span><span class="method-args">(...)</span>
1058
+ </a>
1059
+ </div>
1060
+
1061
+ <div class="method-description">
1062
+ <p>
1063
+ Blend a source image onto the image
1064
+ </p>
1065
+ <p>
1066
+ Examples:
1067
+ </p>
1068
+ <pre>
1069
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
1070
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
1071
+ image.blend! source_image,
1072
+ src_x, src_y, src_w, src_h,
1073
+ dst_x, dst_y, dst_w, dst_h
1074
+
1075
+ src_rect = [50, 50, 5, 5]
1076
+ dst_rect = [0, 0, image.width, image.height]
1077
+ merge_alpha = false
1078
+ image.blend! source_image, src_rect, dst_rect, merge_alpha
1079
+
1080
+ src_x, src_y, src_w, src_h = 10, 10, 100, 100
1081
+ dst_x, dst_y, dst_w, dst_h = 10, 10, 50, 50
1082
+ image.blend_image! source_image,
1083
+ src_x, src_y, src_w, src_h,
1084
+ dst_x, dst_y, dst_w, dst_h
1085
+
1086
+ src_rect = [50, 50, 5, 5]
1087
+ dst_rect = [0, 0, image.width, image.height]
1088
+ merge_alpha = false
1089
+ image.blend_image! source_image, src_rect, dst_rect, merge_alpha
1090
+ </pre>
1091
+ </div>
1092
+ </div>
1093
+
1094
+ <div id="method-M000300" class="method-detail">
1095
+ <a name="M000300"></a>
1096
+
1097
+ <div class="method-heading">
1098
+ <a href="Image.src/M000300.html" target="Code" class="method-signature"
1099
+ onclick="popupCode('Image.src/M000300.html');return false;">
1100
+ <span class="method-name">blur</span><span class="method-args">(p1)</span>
1101
+ </a>
1102
+ </div>
1103
+
1104
+ <div class="method-description">
1105
+ <p>
1106
+ Return a blurred copy of an image
1107
+ </p>
1108
+ <p>
1109
+ Examples:
1110
+ </p>
1111
+ <pre>
1112
+ radius = 20 # radius of blur, in pixels
1113
+ new_image = old_image.blur radius
1114
+ </pre>
1115
+ </div>
1116
+ </div>
1117
+
1118
+ <div id="method-M000301" class="method-detail">
1119
+ <a name="M000301"></a>
1120
+
1121
+ <div class="method-heading">
1122
+ <a href="Image.src/M000301.html" target="Code" class="method-signature"
1123
+ onclick="popupCode('Image.src/M000301.html');return false;">
1124
+ <span class="method-name">blur!</span><span class="method-args">(p1)</span>
1125
+ </a>
1126
+ </div>
1127
+
1128
+ <div class="method-description">
1129
+ <p>
1130
+ Blur an image
1131
+ </p>
1132
+ <p>
1133
+ Examples:
1134
+ </p>
1135
+ <pre>
1136
+ radius = 20 # radius of blur, in pixels
1137
+ image.blur! radius
1138
+ </pre>
1139
+ </div>
1140
+ </div>
1141
+
1142
+ <div id="method-M000260" class="method-detail">
1143
+ <a name="M000260"></a>
1144
+
1145
+ <div class="method-heading">
1146
+ <a href="Image.src/M000260.html" target="Code" class="method-signature"
1147
+ onclick="popupCode('Image.src/M000260.html');return false;">
1148
+ <span class="method-name">border</span><span class="method-args">()</span>
1149
+ </a>
1150
+ </div>
1151
+
1152
+ <div class="method-description">
1153
+ <p>
1154
+ Get the <a href="Border.html">Imlib2::Border</a> of an <a
1155
+ href="Image.html">Imlib2::Image</a>
1156
+ </p>
1157
+ <p>
1158
+ Examples:
1159
+ </p>
1160
+ <pre>
1161
+ border = image.get_border
1162
+ border = image.border
1163
+ </pre>
1164
+ </div>
1165
+ </div>
1166
+
1167
+ <div id="method-M000262" class="method-detail">
1168
+ <a name="M000262"></a>
1169
+
1170
+ <div class="method-heading">
1171
+ <a href="Image.src/M000262.html" target="Code" class="method-signature"
1172
+ onclick="popupCode('Image.src/M000262.html');return false;">
1173
+ <span class="method-name">border=</span><span class="method-args">(p1)</span>
1174
+ </a>
1175
+ </div>
1176
+
1177
+ <div class="method-description">
1178
+ <p>
1179
+ Set the <a href="Border.html">Imlib2::Border</a> of an <a
1180
+ href="Image.html">Imlib2::Image</a>
1181
+ </p>
1182
+ <p>
1183
+ Examples:
1184
+ </p>
1185
+ <pre>
1186
+ image.set_border border
1187
+ image.border = border
1188
+ </pre>
1189
+ </div>
1190
+ </div>
1191
+
1192
+ <div id="method-M000258" class="method-detail">
1193
+ <a name="M000258"></a>
1194
+
1195
+ <div class="method-heading">
1196
+ <a href="Image.src/M000258.html" target="Code" class="method-signature"
1197
+ onclick="popupCode('Image.src/M000258.html');return false;">
1198
+ <span class="method-name">changes_on_disk</span><span class="method-args">()</span>
1199
+ </a>
1200
+ </div>
1201
+
1202
+ <div class="method-description">
1203
+ <p>
1204
+ Flag this image as changing on disk
1205
+ </p>
1206
+ <p>
1207
+ Examples:
1208
+ </p>
1209
+ <pre>
1210
+ image.changes_on_disk
1211
+ </pre>
1212
+ </div>
1213
+ </div>
1214
+
1215
+ <div id="method-M000342" class="method-detail">
1216
+ <a name="M000342"></a>
1217
+
1218
+ <div class="method-heading">
1219
+ <a href="Image.src/M000342.html" target="Code" class="method-signature"
1220
+ onclick="popupCode('Image.src/M000342.html');return false;">
1221
+ <span class="method-name">clear</span><span class="method-args">()</span>
1222
+ </a>
1223
+ </div>
1224
+
1225
+ <div class="method-description">
1226
+ <p>
1227
+ Clear the contents of an image
1228
+ </p>
1229
+ <p>
1230
+ Examples:
1231
+ </p>
1232
+ <pre>
1233
+ image.clear
1234
+ </pre>
1235
+ </div>
1236
+ </div>
1237
+
1238
+ <div id="method-M000343" class="method-detail">
1239
+ <a name="M000343"></a>
1240
+
1241
+ <div class="method-heading">
1242
+ <a href="Image.src/M000343.html" target="Code" class="method-signature"
1243
+ onclick="popupCode('Image.src/M000343.html');return false;">
1244
+ <span class="method-name">clear_color</span><span class="method-args">(p1)</span>
1245
+ </a>
1246
+ </div>
1247
+
1248
+ <div class="method-description">
1249
+ <p>
1250
+ I&#8217;m honestly not quite sure what this function does, but I wrapped it
1251
+ anyway.
1252
+ </p>
1253
+ </div>
1254
+ </div>
1255
+
1256
+ <div id="method-M000344" class="method-detail">
1257
+ <a name="M000344"></a>
1258
+
1259
+ <div class="method-heading">
1260
+ <a href="Image.src/M000344.html" target="Code" class="method-signature"
1261
+ onclick="popupCode('Image.src/M000344.html');return false;">
1262
+ <span class="method-name">clear_color!</span><span class="method-args">(p1)</span>
1263
+ </a>
1264
+ </div>
1265
+
1266
+ <div class="method-description">
1267
+ <p>
1268
+ I&#8217;m honestly not quite sure what this function does, but I wrapped it
1269
+ anyway.
1270
+ </p>
1271
+ </div>
1272
+ </div>
1273
+
1274
+ <div id="method-M000312" class="method-detail">
1275
+ <a name="M000312"></a>
1276
+
1277
+ <div class="method-heading">
1278
+ <span class="method-name">clip_line</span><span class="method-args">(...)</span>
1279
+ </div>
1280
+
1281
+ <div class="method-description">
1282
+ </div>
1283
+ </div>
1284
+
1285
+ <div id="method-M000340" class="method-detail">
1286
+ <a name="M000340"></a>
1287
+
1288
+ <div class="method-heading">
1289
+ <a href="Image.src/M000340.html" target="Code" class="method-signature"
1290
+ onclick="popupCode('Image.src/M000340.html');return false;">
1291
+ <span class="method-name">clone</span><span class="method-args">()</span>
1292
+ </a>
1293
+ </div>
1294
+
1295
+ <div class="method-description">
1296
+ <p>
1297
+ Copy an <a href="Image.html">Imlib2::Image</a>
1298
+ </p>
1299
+ <p>
1300
+ Examples:
1301
+ </p>
1302
+ <pre>
1303
+ new_image = old_image.clone
1304
+ new_image = old_image.dup
1305
+ </pre>
1306
+ </div>
1307
+ </div>
1308
+
1309
+ <div id="method-M000328" class="method-detail">
1310
+ <a name="M000328"></a>
1311
+
1312
+ <div class="method-heading">
1313
+ <a href="Image.src/M000328.html" target="Code" class="method-signature"
1314
+ onclick="popupCode('Image.src/M000328.html');return false;">
1315
+ <span class="method-name">color_range</span><span class="method-args">(...)</span>
1316
+ </a>
1317
+ </div>
1318
+
1319
+ <div class="method-description">
1320
+ <p>
1321
+ Fill a rectangle with the given <a
1322
+ href="Gradient.html">Imlib2::Gradient</a> at a given angle
1323
+ </p>
1324
+ <p>
1325
+ Examples:
1326
+ </p>
1327
+ <pre>
1328
+ x, y, w, h = 10, 10, image.width - 20, image.height - 20
1329
+ angle = 45.2
1330
+ image.fill_gradient gradient, x, y, w, h, angle
1331
+
1332
+ rect = [5, 5, 500, 20]
1333
+ image.gradient gradient, rect, 36.8
1334
+ </pre>
1335
+ </div>
1336
+ </div>
1337
+
1338
+ <div id="method-M000317" class="method-detail">
1339
+ <a name="M000317"></a>
1340
+
1341
+ <div class="method-heading">
1342
+ <a href="Image.src/M000317.html" target="Code" class="method-signature"
1343
+ onclick="popupCode('Image.src/M000317.html');return false;">
1344
+ <span class="method-name">copy_alpha</span><span class="method-args">(...)</span>
1345
+ </a>
1346
+ </div>
1347
+
1348
+ <div class="method-description">
1349
+ <p>
1350
+ Copy the alpha channel from the source image to the specified coordinates
1351
+ </p>
1352
+ <p>
1353
+ Examples:
1354
+ </p>
1355
+ <pre>
1356
+ image.copy_alpha source_image, 10, 10
1357
+ image.copy_alpha source_image, [10, 10]
1358
+ </pre>
1359
+ </div>
1360
+ </div>
1361
+
1362
+ <div id="method-M000318" class="method-detail">
1363
+ <a name="M000318"></a>
1364
+
1365
+ <div class="method-heading">
1366
+ <a href="Image.src/M000318.html" target="Code" class="method-signature"
1367
+ onclick="popupCode('Image.src/M000318.html');return false;">
1368
+ <span class="method-name">copy_alpha_rect</span><span class="method-args">(...)</span>
1369
+ </a>
1370
+ </div>
1371
+
1372
+ <div class="method-description">
1373
+ <p>
1374
+ Copy the alpha channel from a rectangle of the source image to the
1375
+ specified coordinates
1376
+ </p>
1377
+ <p>
1378
+ Examples:
1379
+ </p>
1380
+ <pre>
1381
+ x, y, w, h = 10, 20, 100, 200
1382
+ dest_x, dest_y = 5, 10
1383
+ image.copy_alpha_rect source_image, x, y, w, h, dest_x, dest_y
1384
+
1385
+ source_rect = [10, 20, 100, 200]
1386
+ dest_coords = [5, 10]
1387
+ image.copy_alpha_rect source_image, source_rect, dest_coords
1388
+
1389
+ values = [10, 20, 100, 200, 5, 10]
1390
+ image.copy_alpha_rect source_image, values
1391
+ </pre>
1392
+ </div>
1393
+ </div>
1394
+
1395
+ <div id="method-M000362" class="method-detail">
1396
+ <a name="M000362"></a>
1397
+
1398
+ <div class="method-heading">
1399
+ <span class="method-name">copy_drawable</span><span class="method-args">(...)</span>
1400
+ </div>
1401
+
1402
+ <div class="method-description">
1403
+ </div>
1404
+ </div>
1405
+
1406
+ <div id="method-M000320" class="method-detail">
1407
+ <a name="M000320"></a>
1408
+
1409
+ <div class="method-heading">
1410
+ <a href="Image.src/M000320.html" target="Code" class="method-signature"
1411
+ onclick="popupCode('Image.src/M000320.html');return false;">
1412
+ <span class="method-name">copy_rect</span><span class="method-args">(...)</span>
1413
+ </a>
1414
+ </div>
1415
+
1416
+ <div class="method-description">
1417
+ <p>
1418
+ Copy a rectangle to the specified coordinates
1419
+ </p>
1420
+ <p>
1421
+ Examples:
1422
+ </p>
1423
+ <pre>
1424
+ x, y, w, h = 10, 20, 100, 200
1425
+ dest_x, dest_y = 5, 10
1426
+ image.copy_rect x, y, w, h, dest_x, dest_y
1427
+
1428
+ source_rect = [10, 20, 100, 200]
1429
+ dest_coords = [5, 10]
1430
+ image.copy_rect source_rect, dest_coords
1431
+
1432
+ values = [10, 20, 100, 200, 5, 10]
1433
+ image.copy_rect values
1434
+ </pre>
1435
+ </div>
1436
+ </div>
1437
+
1438
+ <div id="method-M000285" class="method-detail">
1439
+ <a name="M000285"></a>
1440
+
1441
+ <div class="method-heading">
1442
+ <a href="Image.src/M000285.html" target="Code" class="method-signature"
1443
+ onclick="popupCode('Image.src/M000285.html');return false;">
1444
+ <span class="method-name">create_cropped</span><span class="method-args">(...)</span>
1445
+ </a>
1446
+ </div>
1447
+
1448
+ <div class="method-description">
1449
+ <p>
1450
+ Return a cropped copy of the image
1451
+ </p>
1452
+ <p>
1453
+ Examples:
1454
+ </p>
1455
+ <pre>
1456
+ x, y, w, h = 10, 10, old_image.width - 10, old_image.height - 10
1457
+ new_image = old_image.crop x, y, w, h
1458
+
1459
+ rect = [10, 10, old_image.width - 10, old_image.height - 10]
1460
+ new_image = old_image.crop rect
1461
+
1462
+ x, y, w, h = 10, 10, old_image.width - 10, old_image.height - 10
1463
+ new_image = old_image.create_cropped x, y, w, h
1464
+
1465
+ rect = [10, 10, old_image.width - 10, old_image.height - 10]
1466
+ new_image = old_image.create_cropped rect
1467
+ </pre>
1468
+ </div>
1469
+ </div>
1470
+
1471
+ <div id="method-M000287" class="method-detail">
1472
+ <a name="M000287"></a>
1473
+
1474
+ <div class="method-heading">
1475
+ <a href="Image.src/M000287.html" target="Code" class="method-signature"
1476
+ onclick="popupCode('Image.src/M000287.html');return false;">
1477
+ <span class="method-name">create_cropped!</span><span class="method-args">(...)</span>
1478
+ </a>
1479
+ </div>
1480
+
1481
+ <div class="method-description">
1482
+ <p>
1483
+ Crop an image
1484
+ </p>
1485
+ <p>
1486
+ Examples:
1487
+ </p>
1488
+ <pre>
1489
+ x, y, w, h = 10, 10, image.width - 10, image.height - 10
1490
+ image.crop! x, y, w, h
1491
+
1492
+ rect = [10, 10, image.width - 10, image.height - 10]
1493
+ image.crop! rect
1494
+
1495
+ x, y, w, h = 10, 10, image.width - 10, image.height - 10
1496
+ image.create_cropped! x, y, w, h
1497
+
1498
+ rect = [10, 10, image.width - 10, image.height - 10]
1499
+ image.create_cropped! rect
1500
+ </pre>
1501
+ </div>
1502
+ </div>
1503
+
1504
+ <div id="method-M000289" class="method-detail">
1505
+ <a name="M000289"></a>
1506
+
1507
+ <div class="method-heading">
1508
+ <a href="Image.src/M000289.html" target="Code" class="method-signature"
1509
+ onclick="popupCode('Image.src/M000289.html');return false;">
1510
+ <span class="method-name">create_cropped_scaled</span><span class="method-args">(...)</span>
1511
+ </a>
1512
+ </div>
1513
+
1514
+ <div class="method-description">
1515
+ <p>
1516
+ Create a cropped and scaled copy of an image
1517
+ </p>
1518
+ <p>
1519
+ Examples:
1520
+ </p>
1521
+ <pre>
1522
+ iw, ih = old_image.width, old_image.height
1523
+ new_w, new_h = iw - 20, ih - 20
1524
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1525
+ new_image = old_image.crop_scaled x, y, w, h, new_w, new_h
1526
+
1527
+ iw, ih = old_image.width, old_image.height
1528
+ new_w, new_h = iw - 20, ih - 20
1529
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1530
+ new_image = old_image.crop_scaled values
1531
+
1532
+ iw, ih = old_image.width, old_image.height
1533
+ new_w, new_h = iw - 20, ih - 20
1534
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1535
+ new_image = old_image.create_crop_scaled x, y, w, h, new_w, new_h
1536
+
1537
+ iw, ih = old_image.width, old_image.height
1538
+ new_w, new_h = iw - 20, ih - 20
1539
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1540
+ new_image = old_image.create_crop_scaled values
1541
+ </pre>
1542
+ </div>
1543
+ </div>
1544
+
1545
+ <div id="method-M000291" class="method-detail">
1546
+ <a name="M000291"></a>
1547
+
1548
+ <div class="method-heading">
1549
+ <a href="Image.src/M000291.html" target="Code" class="method-signature"
1550
+ onclick="popupCode('Image.src/M000291.html');return false;">
1551
+ <span class="method-name">create_cropped_scaled!</span><span class="method-args">(...)</span>
1552
+ </a>
1553
+ </div>
1554
+
1555
+ <div class="method-description">
1556
+ <p>
1557
+ Crop and scale an image
1558
+ </p>
1559
+ <p>
1560
+ Examples:
1561
+ </p>
1562
+ <pre>
1563
+ iw, ih = image.width, image.height
1564
+ new_w, new_h = iw - 20, ih - 20
1565
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1566
+ image.crop_scaled! x, y, w, h, new_w, new_h
1567
+
1568
+ iw, ih = image.width, image.height
1569
+ new_w, new_h = iw - 20, ih - 20
1570
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1571
+ image.crop_scaled! values
1572
+
1573
+ iw, ih = image.width, image.height
1574
+ new_w, new_h = iw - 20, ih - 20
1575
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1576
+ image.create_crop_scaled! x, y, w, h, new_w, new_h
1577
+
1578
+ iw, ih = image.width, image.height
1579
+ new_w, new_h = iw - 20, ih - 20
1580
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1581
+ image.create_crop_scaled! values
1582
+ </pre>
1583
+ </div>
1584
+ </div>
1585
+
1586
+ <div id="method-M000284" class="method-detail">
1587
+ <a name="M000284"></a>
1588
+
1589
+ <div class="method-heading">
1590
+ <a href="Image.src/M000284.html" target="Code" class="method-signature"
1591
+ onclick="popupCode('Image.src/M000284.html');return false;">
1592
+ <span class="method-name">crop</span><span class="method-args">(...)</span>
1593
+ </a>
1594
+ </div>
1595
+
1596
+ <div class="method-description">
1597
+ <p>
1598
+ Return a cropped copy of the image
1599
+ </p>
1600
+ <p>
1601
+ Examples:
1602
+ </p>
1603
+ <pre>
1604
+ x, y, w, h = 10, 10, old_image.width - 10, old_image.height - 10
1605
+ new_image = old_image.crop x, y, w, h
1606
+
1607
+ rect = [10, 10, old_image.width - 10, old_image.height - 10]
1608
+ new_image = old_image.crop rect
1609
+
1610
+ x, y, w, h = 10, 10, old_image.width - 10, old_image.height - 10
1611
+ new_image = old_image.create_cropped x, y, w, h
1612
+
1613
+ rect = [10, 10, old_image.width - 10, old_image.height - 10]
1614
+ new_image = old_image.create_cropped rect
1615
+ </pre>
1616
+ </div>
1617
+ </div>
1618
+
1619
+ <div id="method-M000286" class="method-detail">
1620
+ <a name="M000286"></a>
1621
+
1622
+ <div class="method-heading">
1623
+ <a href="Image.src/M000286.html" target="Code" class="method-signature"
1624
+ onclick="popupCode('Image.src/M000286.html');return false;">
1625
+ <span class="method-name">crop!</span><span class="method-args">(...)</span>
1626
+ </a>
1627
+ </div>
1628
+
1629
+ <div class="method-description">
1630
+ <p>
1631
+ Crop an image
1632
+ </p>
1633
+ <p>
1634
+ Examples:
1635
+ </p>
1636
+ <pre>
1637
+ x, y, w, h = 10, 10, image.width - 10, image.height - 10
1638
+ image.crop! x, y, w, h
1639
+
1640
+ rect = [10, 10, image.width - 10, image.height - 10]
1641
+ image.crop! rect
1642
+
1643
+ x, y, w, h = 10, 10, image.width - 10, image.height - 10
1644
+ image.create_cropped! x, y, w, h
1645
+
1646
+ rect = [10, 10, image.width - 10, image.height - 10]
1647
+ image.create_cropped! rect
1648
+ </pre>
1649
+ </div>
1650
+ </div>
1651
+
1652
+ <div id="method-M000288" class="method-detail">
1653
+ <a name="M000288"></a>
1654
+
1655
+ <div class="method-heading">
1656
+ <a href="Image.src/M000288.html" target="Code" class="method-signature"
1657
+ onclick="popupCode('Image.src/M000288.html');return false;">
1658
+ <span class="method-name">crop_scaled</span><span class="method-args">(...)</span>
1659
+ </a>
1660
+ </div>
1661
+
1662
+ <div class="method-description">
1663
+ <p>
1664
+ Create a cropped and scaled copy of an image
1665
+ </p>
1666
+ <p>
1667
+ Examples:
1668
+ </p>
1669
+ <pre>
1670
+ iw, ih = old_image.width, old_image.height
1671
+ new_w, new_h = iw - 20, ih - 20
1672
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1673
+ new_image = old_image.crop_scaled x, y, w, h, new_w, new_h
1674
+
1675
+ iw, ih = old_image.width, old_image.height
1676
+ new_w, new_h = iw - 20, ih - 20
1677
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1678
+ new_image = old_image.crop_scaled values
1679
+
1680
+ iw, ih = old_image.width, old_image.height
1681
+ new_w, new_h = iw - 20, ih - 20
1682
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1683
+ new_image = old_image.create_crop_scaled x, y, w, h, new_w, new_h
1684
+
1685
+ iw, ih = old_image.width, old_image.height
1686
+ new_w, new_h = iw - 20, ih - 20
1687
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1688
+ new_image = old_image.create_crop_scaled values
1689
+ </pre>
1690
+ </div>
1691
+ </div>
1692
+
1693
+ <div id="method-M000290" class="method-detail">
1694
+ <a name="M000290"></a>
1695
+
1696
+ <div class="method-heading">
1697
+ <a href="Image.src/M000290.html" target="Code" class="method-signature"
1698
+ onclick="popupCode('Image.src/M000290.html');return false;">
1699
+ <span class="method-name">crop_scaled!</span><span class="method-args">(...)</span>
1700
+ </a>
1701
+ </div>
1702
+
1703
+ <div class="method-description">
1704
+ <p>
1705
+ Crop and scale an image
1706
+ </p>
1707
+ <p>
1708
+ Examples:
1709
+ </p>
1710
+ <pre>
1711
+ iw, ih = image.width, image.height
1712
+ new_w, new_h = iw - 20, ih - 20
1713
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1714
+ image.crop_scaled! x, y, w, h, new_w, new_h
1715
+
1716
+ iw, ih = image.width, image.height
1717
+ new_w, new_h = iw - 20, ih - 20
1718
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1719
+ image.crop_scaled! values
1720
+
1721
+ iw, ih = image.width, image.height
1722
+ new_w, new_h = iw - 20, ih - 20
1723
+ x, y, w, h = 10, 10, iw - 10, ih - 10
1724
+ image.create_crop_scaled! x, y, w, h, new_w, new_h
1725
+
1726
+ iw, ih = image.width, image.height
1727
+ new_w, new_h = iw - 20, ih - 20
1728
+ values = [10, 10, iw - 10, iw - 10, new_w, new_h]
1729
+ image.create_crop_scaled! values
1730
+ </pre>
1731
+ </div>
1732
+ </div>
1733
+
1734
+ <div id="method-M000249" class="method-detail">
1735
+ <a name="M000249"></a>
1736
+
1737
+ <div class="method-heading">
1738
+ <a href="Image.src/M000249.html" target="Code" class="method-signature"
1739
+ onclick="popupCode('Image.src/M000249.html');return false;">
1740
+ <span class="method-name">data</span><span class="method-args">()</span>
1741
+ </a>
1742
+ </div>
1743
+
1744
+ <div class="method-description">
1745
+ <p>
1746
+ Return a copy of an image&#8217;s raw 32-bit data.
1747
+ </p>
1748
+ <p>
1749
+ Examples:
1750
+ </p>
1751
+ <pre>
1752
+ raw = image.data
1753
+ </pre>
1754
+ </div>
1755
+ </div>
1756
+
1757
+ <div id="method-M000251" class="method-detail">
1758
+ <a name="M000251"></a>
1759
+
1760
+ <div class="method-heading">
1761
+ <a href="Image.src/M000251.html" target="Code" class="method-signature"
1762
+ onclick="popupCode('Image.src/M000251.html');return false;">
1763
+ <span class="method-name">data!</span><span class="method-args">()</span>
1764
+ </a>
1765
+ </div>
1766
+
1767
+ <div class="method-description">
1768
+ <p>
1769
+ Return a read-only reference to an image&#8217;s raw 32-bit data.
1770
+ </p>
1771
+ <p>
1772
+ Examples:
1773
+ </p>
1774
+ <pre>
1775
+ RAW_DATA = image.data_for_reading_only
1776
+ RAW_DATA = image.data!
1777
+ </pre>
1778
+ </div>
1779
+ </div>
1780
+
1781
+ <div id="method-M000252" class="method-detail">
1782
+ <a name="M000252"></a>
1783
+
1784
+ <div class="method-heading">
1785
+ <a href="Image.src/M000252.html" target="Code" class="method-signature"
1786
+ onclick="popupCode('Image.src/M000252.html');return false;">
1787
+ <span class="method-name">data=</span><span class="method-args">(p1)</span>
1788
+ </a>
1789
+ </div>
1790
+
1791
+ <div class="method-description">
1792
+ <p>
1793
+ Fill an image using raw 32-bit data.
1794
+ </p>
1795
+ <p>
1796
+ Note: The new data buffer must be the same size (in bytes) as the original
1797
+ data buffer.
1798
+ </p>
1799
+ <p>
1800
+ Examples:
1801
+ </p>
1802
+ <pre>
1803
+ RAW_DATA = other_image.data!
1804
+ image.put_data RAW_DATA
1805
+
1806
+ RAW_DATA = other_image.data!
1807
+ image.data = RAW_DATA
1808
+ </pre>
1809
+ </div>
1810
+ </div>
1811
+
1812
+ <div id="method-M000250" class="method-detail">
1813
+ <a name="M000250"></a>
1814
+
1815
+ <div class="method-heading">
1816
+ <a href="Image.src/M000250.html" target="Code" class="method-signature"
1817
+ onclick="popupCode('Image.src/M000250.html');return false;">
1818
+ <span class="method-name">data_for_reading_only</span><span class="method-args">()</span>
1819
+ </a>
1820
+ </div>
1821
+
1822
+ <div class="method-description">
1823
+ <p>
1824
+ Return a read-only reference to an image&#8217;s raw 32-bit data.
1825
+ </p>
1826
+ <p>
1827
+ Examples:
1828
+ </p>
1829
+ <pre>
1830
+ RAW_DATA = image.data_for_reading_only
1831
+ RAW_DATA = image.data!
1832
+ </pre>
1833
+ </div>
1834
+ </div>
1835
+
1836
+ <div id="method-M000243" class="method-detail">
1837
+ <a name="M000243"></a>
1838
+
1839
+ <div class="method-heading">
1840
+ <a href="Image.src/M000243.html" target="Code" class="method-signature"
1841
+ onclick="popupCode('Image.src/M000243.html');return false;">
1842
+ <span class="method-name">delete!</span><span class="method-args">(...)</span>
1843
+ </a>
1844
+ </div>
1845
+
1846
+ <div class="method-description">
1847
+ <p>
1848
+ Free an <a href="Image.html">Imlib2::Image</a> object, and (optionally)
1849
+ de-cache it as well.
1850
+ </p>
1851
+ <p>
1852
+ Note: Any future operations on this image will raise an exception.
1853
+ </p>
1854
+ <p>
1855
+ Examples:
1856
+ </p>
1857
+ <pre>
1858
+ # free image
1859
+ im.delete!
1860
+
1861
+ # free image, and de-cache it too
1862
+ im.delete!(true)
1863
+ </pre>
1864
+ </div>
1865
+ </div>
1866
+
1867
+ <div id="method-M000321" class="method-detail">
1868
+ <a name="M000321"></a>
1869
+
1870
+ <div class="method-heading">
1871
+ <a href="Image.src/M000321.html" target="Code" class="method-signature"
1872
+ onclick="popupCode('Image.src/M000321.html');return false;">
1873
+ <span class="method-name">draw_ellipse</span><span class="method-args">(...)</span>
1874
+ </a>
1875
+ </div>
1876
+
1877
+ <div class="method-description">
1878
+ <p>
1879
+ Draw an ellipse at the specified coordinates with the given color
1880
+ </p>
1881
+ <p>
1882
+ Examples:
1883
+ </p>
1884
+ <pre>
1885
+ # draw an ellipse in the center of the image using the context color
1886
+ xc, yc, w, h = image.w / 2, image.h / 2, image.w / 2, image.h / 2
1887
+ image.draw_oval xc, yc, w, h
1888
+
1889
+ # draw a violet circle in the center of the image
1890
+ rect = [image.w / 2, image.h / 2, image.w / 2, image.w / 2]
1891
+ color = Imlib2::Color::VIOLET
1892
+ image.draw_ellipse rect, color
1893
+ </pre>
1894
+ </div>
1895
+ </div>
1896
+
1897
+ <div id="method-M000311" class="method-detail">
1898
+ <a name="M000311"></a>
1899
+
1900
+ <div class="method-heading">
1901
+ <a href="Image.src/M000311.html" target="Code" class="method-signature"
1902
+ onclick="popupCode('Image.src/M000311.html');return false;">
1903
+ <span class="method-name">draw_line</span><span class="method-args">(...)</span>
1904
+ </a>
1905
+ </div>
1906
+
1907
+ <div class="method-description">
1908
+ <p>
1909
+ Draw a line at the specified coordinates.
1910
+ </p>
1911
+ <p>
1912
+ Examples:
1913
+ </p>
1914
+ <pre>
1915
+ # draw line from 10, 10 to 20, 20 using context color
1916
+ im.draw_line 10, 10, 20, 20
1917
+
1918
+ # draw magenta line from 5, 10 to 15, 20
1919
+ im.draw_line 5, 10, 15, 20, Imlib2::Color::MAGENTA
1920
+
1921
+ # draw line from 10, 15 to 20, 25 using context color
1922
+ im.draw_pixel [10, 15], [20, 25]
1923
+
1924
+ # draw line from 1000, 2000 to 2100, 4200 with funky color
1925
+ my_color = Imlib2::Color::CmykColor.new 100, 255, 0, 128
1926
+ im.draw_line [1000, 2000], [2100, 4200], my_color
1927
+ </pre>
1928
+ </div>
1929
+ </div>
1930
+
1931
+ <div id="method-M000322" class="method-detail">
1932
+ <a name="M000322"></a>
1933
+
1934
+ <div class="method-heading">
1935
+ <a href="Image.src/M000322.html" target="Code" class="method-signature"
1936
+ onclick="popupCode('Image.src/M000322.html');return false;">
1937
+ <span class="method-name">draw_oval</span><span class="method-args">(...)</span>
1938
+ </a>
1939
+ </div>
1940
+
1941
+ <div class="method-description">
1942
+ <p>
1943
+ Draw an ellipse at the specified coordinates with the given color
1944
+ </p>
1945
+ <p>
1946
+ Examples:
1947
+ </p>
1948
+ <pre>
1949
+ # draw an ellipse in the center of the image using the context color
1950
+ xc, yc, w, h = image.w / 2, image.h / 2, image.w / 2, image.h / 2
1951
+ image.draw_oval xc, yc, w, h
1952
+
1953
+ # draw a violet circle in the center of the image
1954
+ rect = [image.w / 2, image.h / 2, image.w / 2, image.w / 2]
1955
+ color = Imlib2::Color::VIOLET
1956
+ image.draw_ellipse rect, color
1957
+ </pre>
1958
+ </div>
1959
+ </div>
1960
+
1961
+ <div id="method-M000310" class="method-detail">
1962
+ <a name="M000310"></a>
1963
+
1964
+ <div class="method-heading">
1965
+ <a href="Image.src/M000310.html" target="Code" class="method-signature"
1966
+ onclick="popupCode('Image.src/M000310.html');return false;">
1967
+ <span class="method-name">draw_pixel</span><span class="method-args">(...)</span>
1968
+ </a>
1969
+ </div>
1970
+
1971
+ <div class="method-description">
1972
+ <p>
1973
+ Draw a pixel at the specified coordinates.
1974
+ </p>
1975
+ <p>
1976
+ Note: Versions of <a href="../Imlib2.html">Imlib2</a> up to and including
1977
+ 1.0.5 had a broken imlib_image_draw_pixel() call. <a
1978
+ href="../Imlib2.html">Imlib2</a>-Ruby has a work-around, which simulates
1979
+ drawing a pixel with a 1x1 rectangle. To disable this behavior, see the
1980
+ Imlib2::Image::draw_pixel_workaround= method.
1981
+ </p>
1982
+ <p>
1983
+ Examples:
1984
+ </p>
1985
+ <pre>
1986
+ im.draw_pixel 10, 10 # draw using context color
1987
+ im.draw_pixel 10, 10, Imlib2::Color::BLUE # draw blue pixel
1988
+ im.draw_pixel [10, 10], Imlib2::Color::RED # draw red pixel
1989
+ </pre>
1990
+ </div>
1991
+ </div>
1992
+
1993
+ <div id="method-M000330" class="method-detail">
1994
+ <a name="M000330"></a>
1995
+
1996
+ <div class="method-heading">
1997
+ <a href="Image.src/M000330.html" target="Code" class="method-signature"
1998
+ onclick="popupCode('Image.src/M000330.html');return false;">
1999
+ <span class="method-name">draw_poly</span><span class="method-args">(...)</span>
2000
+ </a>
2001
+ </div>
2002
+
2003
+ <div class="method-description">
2004
+ <p>
2005
+ Draw an <a href="Polygon.html">Imlib2::Polygon</a> with the specified color
2006
+ </p>
2007
+ <p>
2008
+ Examples:
2009
+ </p>
2010
+ <pre>
2011
+ # create a simple blue right triangle
2012
+ triangle = Imlib2::Polygon.new [10, 10], [20, 20], [10, 20]
2013
+ image.draw_polygon triangle, Imlib2::Color::BLUE
2014
+
2015
+ # create an open red square polygon
2016
+ square = Imlib2.Polygon.new [10, 10], [20, 10], [20, 20], [10, 20]
2017
+ image.draw_poly square, false, Imlib2::Color::RED
2018
+ </pre>
2019
+ </div>
2020
+ </div>
2021
+
2022
+ <div id="method-M000331" class="method-detail">
2023
+ <a name="M000331"></a>
2024
+
2025
+ <div class="method-heading">
2026
+ <a href="Image.src/M000331.html" target="Code" class="method-signature"
2027
+ onclick="popupCode('Image.src/M000331.html');return false;">
2028
+ <span class="method-name">draw_polygon</span><span class="method-args">(...)</span>
2029
+ </a>
2030
+ </div>
2031
+
2032
+ <div class="method-description">
2033
+ <p>
2034
+ Draw an <a href="Polygon.html">Imlib2::Polygon</a> with the specified color
2035
+ </p>
2036
+ <p>
2037
+ Examples:
2038
+ </p>
2039
+ <pre>
2040
+ # create a simple blue right triangle
2041
+ triangle = Imlib2::Polygon.new [10, 10], [20, 20], [10, 20]
2042
+ image.draw_polygon triangle, Imlib2::Color::BLUE
2043
+
2044
+ # create an open red square polygon
2045
+ square = Imlib2.Polygon.new [10, 10], [20, 10], [20, 20], [10, 20]
2046
+ image.draw_poly square, false, Imlib2::Color::RED
2047
+ </pre>
2048
+ </div>
2049
+ </div>
2050
+
2051
+ <div id="method-M000313" class="method-detail">
2052
+ <a name="M000313"></a>
2053
+
2054
+ <div class="method-heading">
2055
+ <a href="Image.src/M000313.html" target="Code" class="method-signature"
2056
+ onclick="popupCode('Image.src/M000313.html');return false;">
2057
+ <span class="method-name">draw_rect</span><span class="method-args">(...)</span>
2058
+ </a>
2059
+ </div>
2060
+
2061
+ <div class="method-description">
2062
+ <p>
2063
+ Draw a rectangle outline at the specified coordinates.
2064
+ </p>
2065
+ <p>
2066
+ Examples:
2067
+ </p>
2068
+ <pre>
2069
+ # draw rectangle around edge of image using context color
2070
+ rect = [1, 1, im.width - 2, im.height - 2]
2071
+ im.draw_rect rect
2072
+
2073
+ # draw magenta rectangle outline in top-left corner of image
2074
+ color = Imlib2::Color::MAGENTA
2075
+ im.draw_rect [0, 0], [im.width / 2, im.height / 2], color
2076
+
2077
+ # draw square from 10, 10 to 30, 30 using context color
2078
+ im.draw_rect [10, 10, 20, 20]
2079
+ </pre>
2080
+ </div>
2081
+ </div>
2082
+
2083
+ <div id="method-M000314" class="method-detail">
2084
+ <a name="M000314"></a>
2085
+
2086
+ <div class="method-heading">
2087
+ <a href="Image.src/M000314.html" target="Code" class="method-signature"
2088
+ onclick="popupCode('Image.src/M000314.html');return false;">
2089
+ <span class="method-name">draw_rectangle</span><span class="method-args">(...)</span>
2090
+ </a>
2091
+ </div>
2092
+
2093
+ <div class="method-description">
2094
+ <p>
2095
+ Draw a rectangle outline at the specified coordinates.
2096
+ </p>
2097
+ <p>
2098
+ Examples:
2099
+ </p>
2100
+ <pre>
2101
+ # draw rectangle around edge of image using context color
2102
+ rect = [1, 1, im.width - 2, im.height - 2]
2103
+ im.draw_rect rect
2104
+
2105
+ # draw magenta rectangle outline in top-left corner of image
2106
+ color = Imlib2::Color::MAGENTA
2107
+ im.draw_rect [0, 0], [im.width / 2, im.height / 2], color
2108
+
2109
+ # draw square from 10, 10 to 30, 30 using context color
2110
+ im.draw_rect [10, 10, 20, 20]
2111
+ </pre>
2112
+ </div>
2113
+ </div>
2114
+
2115
+ <div id="method-M000325" class="method-detail">
2116
+ <a name="M000325"></a>
2117
+
2118
+ <div class="method-heading">
2119
+ <a href="Image.src/M000325.html" target="Code" class="method-signature"
2120
+ onclick="popupCode('Image.src/M000325.html');return false;">
2121
+ <span class="method-name">draw_text</span><span class="method-args">(...)</span>
2122
+ </a>
2123
+ </div>
2124
+
2125
+ <div class="method-description">
2126
+ <p>
2127
+ Draw a string with the given <a href="Font.html">Imlib2::Font</a> at the
2128
+ specified coordinates
2129
+ </p>
2130
+ <p>
2131
+ Examples:
2132
+ </p>
2133
+ <pre>
2134
+ font = Imlib2::Font.new 'helvetica/12'
2135
+ string = 'the blue crow flies at midnight'
2136
+ image.draw_text font, string, 10, 10
2137
+
2138
+ # draw text in a specified color
2139
+ font = Imlib2::Font.new 'helvetica/12'
2140
+ string = 'the blue crow flies at midnight'
2141
+ color = Imlib2::Color::AQUA
2142
+ image.draw_text font, string, 10, 10, color
2143
+
2144
+ # draw text in a specified direction
2145
+ font = Imlib2::Font.new 'verdana/24'
2146
+ string = 'the blue crow flies at midnight'
2147
+ color = Imlib2::Color::YELLOW
2148
+ direction = Imlib2::Direction::DOWN
2149
+ image.draw_text font, string, 10, 10, color, direction
2150
+
2151
+ # draw text with return metrics
2152
+ font = Imlib2::Font.new 'arial/36'
2153
+ string = 'the blue crow flies at midnight'
2154
+ color = Imlib2::Color::PURPLE
2155
+ direction = Imlib2::Direction::LEFT
2156
+ metrics = image.draw_text font, string, 10, 10, color, direction
2157
+ ['width', 'height', 'horiz_advance', 'vert_advance'].each_index { |i, v|
2158
+ puts v &lt;&lt; ' = ' &lt;&lt; metrics[i]
2159
+ }
2160
+ </pre>
2161
+ </div>
2162
+ </div>
2163
+
2164
+ <div id="method-M000341" class="method-detail">
2165
+ <a name="M000341"></a>
2166
+
2167
+ <div class="method-heading">
2168
+ <a href="Image.src/M000341.html" target="Code" class="method-signature"
2169
+ onclick="popupCode('Image.src/M000341.html');return false;">
2170
+ <span class="method-name">dup</span><span class="method-args">()</span>
2171
+ </a>
2172
+ </div>
2173
+
2174
+ <div class="method-description">
2175
+ <p>
2176
+ Copy an <a href="Image.html">Imlib2::Image</a>
2177
+ </p>
2178
+ <p>
2179
+ Examples:
2180
+ </p>
2181
+ <pre>
2182
+ new_image = old_image.clone
2183
+ new_image = old_image.dup
2184
+ </pre>
2185
+ </div>
2186
+ </div>
2187
+
2188
+ <div id="method-M000248" class="method-detail">
2189
+ <a name="M000248"></a>
2190
+
2191
+ <div class="method-heading">
2192
+ <a href="Image.src/M000248.html" target="Code" class="method-signature"
2193
+ onclick="popupCode('Image.src/M000248.html');return false;">
2194
+ <span class="method-name">filename</span><span class="method-args">()</span>
2195
+ </a>
2196
+ </div>
2197
+
2198
+ <div class="method-description">
2199
+ <p>
2200
+ Return the filename of an <a href="Image.html">Imlib2::Image</a>.
2201
+ </p>
2202
+ <p>
2203
+ Examples:
2204
+ </p>
2205
+ <pre>
2206
+ path = image.filename
2207
+ </pre>
2208
+ </div>
2209
+ </div>
2210
+
2211
+ <div id="method-M000329" class="method-detail">
2212
+ <a name="M000329"></a>
2213
+
2214
+ <div class="method-heading">
2215
+ <a href="Image.src/M000329.html" target="Code" class="method-signature"
2216
+ onclick="popupCode('Image.src/M000329.html');return false;">
2217
+ <span class="method-name">fill_color_range</span><span class="method-args">(...)</span>
2218
+ </a>
2219
+ </div>
2220
+
2221
+ <div class="method-description">
2222
+ <p>
2223
+ Fill a rectangle with the given <a
2224
+ href="Gradient.html">Imlib2::Gradient</a> at a given angle
2225
+ </p>
2226
+ <p>
2227
+ Examples:
2228
+ </p>
2229
+ <pre>
2230
+ x, y, w, h = 10, 10, image.width - 20, image.height - 20
2231
+ angle = 45.2
2232
+ image.fill_gradient gradient, x, y, w, h, angle
2233
+
2234
+ rect = [5, 5, 500, 20]
2235
+ image.gradient gradient, rect, 36.8
2236
+ </pre>
2237
+ </div>
2238
+ </div>
2239
+
2240
+ <div id="method-M000323" class="method-detail">
2241
+ <a name="M000323"></a>
2242
+
2243
+ <div class="method-heading">
2244
+ <a href="Image.src/M000323.html" target="Code" class="method-signature"
2245
+ onclick="popupCode('Image.src/M000323.html');return false;">
2246
+ <span class="method-name">fill_ellipse</span><span class="method-args">(...)</span>
2247
+ </a>
2248
+ </div>
2249
+
2250
+ <div class="method-description">
2251
+ <p>
2252
+ Fill an ellipse at the specified coordinates with the given color
2253
+ </p>
2254
+ <p>
2255
+ Examples:
2256
+ </p>
2257
+ <pre>
2258
+ # fill an ellipse in the center of the image using the context color
2259
+ xc, yc, w, h = image.w / 2, image.h / 2, image.w / 2, image.h / 2
2260
+ image.draw_oval xc, yc, w, h
2261
+
2262
+ # fill a violet circle in the center of the image
2263
+ rect = [image.w / 2, image.h / 2, image.w / 2, image.w / 2]
2264
+ color = Imlib2::Color::VIOLET
2265
+ image.draw_ellipse rect, color
2266
+ </pre>
2267
+ </div>
2268
+ </div>
2269
+
2270
+ <div id="method-M000327" class="method-detail">
2271
+ <a name="M000327"></a>
2272
+
2273
+ <div class="method-heading">
2274
+ <a href="Image.src/M000327.html" target="Code" class="method-signature"
2275
+ onclick="popupCode('Image.src/M000327.html');return false;">
2276
+ <span class="method-name">fill_gradient</span><span class="method-args">(...)</span>
2277
+ </a>
2278
+ </div>
2279
+
2280
+ <div class="method-description">
2281
+ <p>
2282
+ Fill a rectangle with the given <a
2283
+ href="Gradient.html">Imlib2::Gradient</a> at a given angle
2284
+ </p>
2285
+ <p>
2286
+ Examples:
2287
+ </p>
2288
+ <pre>
2289
+ x, y, w, h = 10, 10, image.width - 20, image.height - 20
2290
+ angle = 45.2
2291
+ image.fill_gradient gradient, x, y, w, h, angle
2292
+
2293
+ rect = [5, 5, 500, 20]
2294
+ image.gradient gradient, rect, 36.8
2295
+ </pre>
2296
+ </div>
2297
+ </div>
2298
+
2299
+ <div id="method-M000324" class="method-detail">
2300
+ <a name="M000324"></a>
2301
+
2302
+ <div class="method-heading">
2303
+ <a href="Image.src/M000324.html" target="Code" class="method-signature"
2304
+ onclick="popupCode('Image.src/M000324.html');return false;">
2305
+ <span class="method-name">fill_oval</span><span class="method-args">(...)</span>
2306
+ </a>
2307
+ </div>
2308
+
2309
+ <div class="method-description">
2310
+ <p>
2311
+ Fill an ellipse at the specified coordinates with the given color
2312
+ </p>
2313
+ <p>
2314
+ Examples:
2315
+ </p>
2316
+ <pre>
2317
+ # fill an ellipse in the center of the image using the context color
2318
+ xc, yc, w, h = image.w / 2, image.h / 2, image.w / 2, image.h / 2
2319
+ image.draw_oval xc, yc, w, h
2320
+
2321
+ # fill a violet circle in the center of the image
2322
+ rect = [image.w / 2, image.h / 2, image.w / 2, image.w / 2]
2323
+ color = Imlib2::Color::VIOLET
2324
+ image.draw_ellipse rect, color
2325
+ </pre>
2326
+ </div>
2327
+ </div>
2328
+
2329
+ <div id="method-M000332" class="method-detail">
2330
+ <a name="M000332"></a>
2331
+
2332
+ <div class="method-heading">
2333
+ <a href="Image.src/M000332.html" target="Code" class="method-signature"
2334
+ onclick="popupCode('Image.src/M000332.html');return false;">
2335
+ <span class="method-name">fill_poly</span><span class="method-args">(...)</span>
2336
+ </a>
2337
+ </div>
2338
+
2339
+ <div class="method-description">
2340
+ <p>
2341
+ Fill an <a href="Polygon.html">Imlib2::Polygon</a> with the specified color
2342
+ </p>
2343
+ <p>
2344
+ Examples:
2345
+ </p>
2346
+ <pre>
2347
+ # create an filled green diamond polygon
2348
+ square = Imlib2.Polygon.new [50, 10], [70, 30], [50, 50], [30, 30]
2349
+ image.fill_poly square, false, Imlib2::Color::GREEN
2350
+ </pre>
2351
+ </div>
2352
+ </div>
2353
+
2354
+ <div id="method-M000333" class="method-detail">
2355
+ <a name="M000333"></a>
2356
+
2357
+ <div class="method-heading">
2358
+ <a href="Image.src/M000333.html" target="Code" class="method-signature"
2359
+ onclick="popupCode('Image.src/M000333.html');return false;">
2360
+ <span class="method-name">fill_polygon</span><span class="method-args">(...)</span>
2361
+ </a>
2362
+ </div>
2363
+
2364
+ <div class="method-description">
2365
+ <p>
2366
+ Fill an <a href="Polygon.html">Imlib2::Polygon</a> with the specified color
2367
+ </p>
2368
+ <p>
2369
+ Examples:
2370
+ </p>
2371
+ <pre>
2372
+ # create an filled green diamond polygon
2373
+ square = Imlib2.Polygon.new [50, 10], [70, 30], [50, 50], [30, 30]
2374
+ image.fill_poly square, false, Imlib2::Color::GREEN
2375
+ </pre>
2376
+ </div>
2377
+ </div>
2378
+
2379
+ <div id="method-M000315" class="method-detail">
2380
+ <a name="M000315"></a>
2381
+
2382
+ <div class="method-heading">
2383
+ <a href="Image.src/M000315.html" target="Code" class="method-signature"
2384
+ onclick="popupCode('Image.src/M000315.html');return false;">
2385
+ <span class="method-name">fill_rect</span><span class="method-args">(...)</span>
2386
+ </a>
2387
+ </div>
2388
+
2389
+ <div class="method-description">
2390
+ <p>
2391
+ Fill a rectangle at the specified coordinates.
2392
+ </p>
2393
+ <p>
2394
+ Examples:
2395
+ </p>
2396
+ <pre>
2397
+ # fill image using context color
2398
+ rect = [0, 0, im.width, im.height]
2399
+ im.fill_rect rect
2400
+
2401
+ # fill top-left quarter of image with green
2402
+ color = Imlib2::Color::GREEN
2403
+ im.fill_rect [0, 0], [im.width / 2, im.height / 2], color
2404
+
2405
+ # fill square from 10, 10 to 30, 30 using context color
2406
+ im.fill_rect [10, 10, 20, 20]
2407
+ </pre>
2408
+ </div>
2409
+ </div>
2410
+
2411
+ <div id="method-M000316" class="method-detail">
2412
+ <a name="M000316"></a>
2413
+
2414
+ <div class="method-heading">
2415
+ <a href="Image.src/M000316.html" target="Code" class="method-signature"
2416
+ onclick="popupCode('Image.src/M000316.html');return false;">
2417
+ <span class="method-name">fill_rectangle</span><span class="method-args">(...)</span>
2418
+ </a>
2419
+ </div>
2420
+
2421
+ <div class="method-description">
2422
+ <p>
2423
+ Fill a rectangle at the specified coordinates.
2424
+ </p>
2425
+ <p>
2426
+ Examples:
2427
+ </p>
2428
+ <pre>
2429
+ # fill image using context color
2430
+ rect = [0, 0, im.width, im.height]
2431
+ im.fill_rect rect
2432
+
2433
+ # fill top-left quarter of image with green
2434
+ color = Imlib2::Color::GREEN
2435
+ im.fill_rect [0, 0], [im.width / 2, im.height / 2], color
2436
+
2437
+ # fill square from 10, 10 to 30, 30 using context color
2438
+ im.fill_rect [10, 10, 20, 20]
2439
+ </pre>
2440
+ </div>
2441
+ </div>
2442
+
2443
+ <div id="method-M000345" class="method-detail">
2444
+ <a name="M000345"></a>
2445
+
2446
+ <div class="method-heading">
2447
+ <a href="Image.src/M000345.html" target="Code" class="method-signature"
2448
+ onclick="popupCode('Image.src/M000345.html');return false;">
2449
+ <span class="method-name">filter</span><span class="method-args">(p1)</span>
2450
+ </a>
2451
+ </div>
2452
+
2453
+ <div class="method-description">
2454
+ <p>
2455
+ Apply a scripted filter or a static (eg <a
2456
+ href="Filter.html">Imlib2::Filter</a>) filter
2457
+ </p>
2458
+ <p>
2459
+ Example:
2460
+ </p>
2461
+ <pre>
2462
+ # apply a static filter
2463
+ filter = Imlib2::Filter.new 20
2464
+ filter.set 2, 2, Imlib2::Color::GREEN
2465
+ image.filter filter
2466
+
2467
+ # apply a scripted filter
2468
+ x, y = 20, 10
2469
+ filter_string = &quot;tint( x=#{x}, y=#{y}, red=255, alpha=55 );&quot;
2470
+ image.filter filter_string
2471
+ </pre>
2472
+ </div>
2473
+ </div>
2474
+
2475
+ <div id="method-M000296" class="method-detail">
2476
+ <a name="M000296"></a>
2477
+
2478
+ <div class="method-heading">
2479
+ <a href="Image.src/M000296.html" target="Code" class="method-signature"
2480
+ onclick="popupCode('Image.src/M000296.html');return false;">
2481
+ <span class="method-name">flip_diagonal</span><span class="method-args">()</span>
2482
+ </a>
2483
+ </div>
2484
+
2485
+ <div class="method-description">
2486
+ <p>
2487
+ Create a copy of an image flipped along it&#8217;s diagonal axis
2488
+ </p>
2489
+ <p>
2490
+ Examples:
2491
+ </p>
2492
+ <pre>
2493
+ new_image = old_image.flip_diagonal
2494
+ </pre>
2495
+ </div>
2496
+ </div>
2497
+
2498
+ <div id="method-M000297" class="method-detail">
2499
+ <a name="M000297"></a>
2500
+
2501
+ <div class="method-heading">
2502
+ <a href="Image.src/M000297.html" target="Code" class="method-signature"
2503
+ onclick="popupCode('Image.src/M000297.html');return false;">
2504
+ <span class="method-name">flip_diagonal!</span><span class="method-args">()</span>
2505
+ </a>
2506
+ </div>
2507
+
2508
+ <div class="method-description">
2509
+ <p>
2510
+ Flip an image along it&#8217;s diagonal axis
2511
+ </p>
2512
+ <p>
2513
+ Examples:
2514
+ </p>
2515
+ <pre>
2516
+ image.flip_diagonal!
2517
+ </pre>
2518
+ </div>
2519
+ </div>
2520
+
2521
+ <div id="method-M000292" class="method-detail">
2522
+ <a name="M000292"></a>
2523
+
2524
+ <div class="method-heading">
2525
+ <a href="Image.src/M000292.html" target="Code" class="method-signature"
2526
+ onclick="popupCode('Image.src/M000292.html');return false;">
2527
+ <span class="method-name">flip_horizontal</span><span class="method-args">()</span>
2528
+ </a>
2529
+ </div>
2530
+
2531
+ <div class="method-description">
2532
+ <p>
2533
+ Create a horizontally-flipped copy of an image
2534
+ </p>
2535
+ <p>
2536
+ Examples:
2537
+ </p>
2538
+ <pre>
2539
+ backwards_image = old_image.flip_horizontal
2540
+ </pre>
2541
+ </div>
2542
+ </div>
2543
+
2544
+ <div id="method-M000293" class="method-detail">
2545
+ <a name="M000293"></a>
2546
+
2547
+ <div class="method-heading">
2548
+ <a href="Image.src/M000293.html" target="Code" class="method-signature"
2549
+ onclick="popupCode('Image.src/M000293.html');return false;">
2550
+ <span class="method-name">flip_horizontal!</span><span class="method-args">()</span>
2551
+ </a>
2552
+ </div>
2553
+
2554
+ <div class="method-description">
2555
+ <p>
2556
+ Flip an image horizontally
2557
+ </p>
2558
+ <p>
2559
+ Examples:
2560
+ </p>
2561
+ <pre>
2562
+ image.flip_horizontal!
2563
+ </pre>
2564
+ </div>
2565
+ </div>
2566
+
2567
+ <div id="method-M000294" class="method-detail">
2568
+ <a name="M000294"></a>
2569
+
2570
+ <div class="method-heading">
2571
+ <a href="Image.src/M000294.html" target="Code" class="method-signature"
2572
+ onclick="popupCode('Image.src/M000294.html');return false;">
2573
+ <span class="method-name">flip_vertical</span><span class="method-args">()</span>
2574
+ </a>
2575
+ </div>
2576
+
2577
+ <div class="method-description">
2578
+ <p>
2579
+ Create a vertically-flipped copy of an image
2580
+ </p>
2581
+ <p>
2582
+ Examples:
2583
+ </p>
2584
+ <pre>
2585
+ upside_down_image = old_image.flip_vertical
2586
+ </pre>
2587
+ </div>
2588
+ </div>
2589
+
2590
+ <div id="method-M000295" class="method-detail">
2591
+ <a name="M000295"></a>
2592
+
2593
+ <div class="method-heading">
2594
+ <a href="Image.src/M000295.html" target="Code" class="method-signature"
2595
+ onclick="popupCode('Image.src/M000295.html');return false;">
2596
+ <span class="method-name">flip_vertical!</span><span class="method-args">()</span>
2597
+ </a>
2598
+ </div>
2599
+
2600
+ <div class="method-description">
2601
+ <p>
2602
+ Flip an image vertically
2603
+ </p>
2604
+ <p>
2605
+ Examples:
2606
+ </p>
2607
+ <pre>
2608
+ image.flip_vertical!
2609
+ </pre>
2610
+ </div>
2611
+ </div>
2612
+
2613
+ <div id="method-M000264" class="method-detail">
2614
+ <a name="M000264"></a>
2615
+
2616
+ <div class="method-heading">
2617
+ <a href="Image.src/M000264.html" target="Code" class="method-signature"
2618
+ onclick="popupCode('Image.src/M000264.html');return false;">
2619
+ <span class="method-name">format</span><span class="method-args">()</span>
2620
+ </a>
2621
+ </div>
2622
+
2623
+ <div class="method-description">
2624
+ <p>
2625
+ Get the on-disk format of an <a href="Image.html">Imlib2::Image</a>
2626
+ </p>
2627
+ <p>
2628
+ Examples:
2629
+ </p>
2630
+ <pre>
2631
+ format = image.get_format
2632
+ format = image.format
2633
+ </pre>
2634
+ </div>
2635
+ </div>
2636
+
2637
+ <div id="method-M000266" class="method-detail">
2638
+ <a name="M000266"></a>
2639
+
2640
+ <div class="method-heading">
2641
+ <a href="Image.src/M000266.html" target="Code" class="method-signature"
2642
+ onclick="popupCode('Image.src/M000266.html');return false;">
2643
+ <span class="method-name">format=</span><span class="method-args">(p1)</span>
2644
+ </a>
2645
+ </div>
2646
+
2647
+ <div class="method-description">
2648
+ <p>
2649
+ Set the on-disk format of an <a href="Image.html">Imlib2::Image</a>
2650
+ </p>
2651
+ <p>
2652
+ Examples:
2653
+ </p>
2654
+ <pre>
2655
+ image.get_format 'png'
2656
+ image.format = 'png'
2657
+ </pre>
2658
+ </div>
2659
+ </div>
2660
+
2661
+ <div id="method-M000353" class="method-detail">
2662
+ <a name="M000353"></a>
2663
+
2664
+ <div class="method-heading">
2665
+ <a href="Image.src/M000353.html" target="Code" class="method-signature"
2666
+ onclick="popupCode('Image.src/M000353.html');return false;">
2667
+ <span class="method-name">get_attached_value</span><span class="method-args">(p1)</span>
2668
+ </a>
2669
+ </div>
2670
+
2671
+ <div class="method-description">
2672
+ <p>
2673
+ Get an integer value attached to an <a href="Image.html">Imlib2::Image</a>.
2674
+ </p>
2675
+ <p>
2676
+ Examples:
2677
+ </p>
2678
+ <pre>
2679
+ qual = image.get_attached_value('quality')
2680
+ qual = image['quality']
2681
+ </pre>
2682
+ </div>
2683
+ </div>
2684
+
2685
+ <div id="method-M000261" class="method-detail">
2686
+ <a name="M000261"></a>
2687
+
2688
+ <div class="method-heading">
2689
+ <a href="Image.src/M000261.html" target="Code" class="method-signature"
2690
+ onclick="popupCode('Image.src/M000261.html');return false;">
2691
+ <span class="method-name">get_border</span><span class="method-args">()</span>
2692
+ </a>
2693
+ </div>
2694
+
2695
+ <div class="method-description">
2696
+ <p>
2697
+ Get the <a href="Border.html">Imlib2::Border</a> of an <a
2698
+ href="Image.html">Imlib2::Image</a>
2699
+ </p>
2700
+ <p>
2701
+ Examples:
2702
+ </p>
2703
+ <pre>
2704
+ border = image.get_border
2705
+ border = image.border
2706
+ </pre>
2707
+ </div>
2708
+ </div>
2709
+
2710
+ <div id="method-M000265" class="method-detail">
2711
+ <a name="M000265"></a>
2712
+
2713
+ <div class="method-heading">
2714
+ <a href="Image.src/M000265.html" target="Code" class="method-signature"
2715
+ onclick="popupCode('Image.src/M000265.html');return false;">
2716
+ <span class="method-name">get_format</span><span class="method-args">()</span>
2717
+ </a>
2718
+ </div>
2719
+
2720
+ <div class="method-description">
2721
+ <p>
2722
+ Get the on-disk format of an <a href="Image.html">Imlib2::Image</a>
2723
+ </p>
2724
+ <p>
2725
+ Examples:
2726
+ </p>
2727
+ <pre>
2728
+ format = image.get_format
2729
+ format = image.format
2730
+ </pre>
2731
+ </div>
2732
+ </div>
2733
+
2734
+ <div id="method-M000326" class="method-detail">
2735
+ <a name="M000326"></a>
2736
+
2737
+ <div class="method-heading">
2738
+ <a href="Image.src/M000326.html" target="Code" class="method-signature"
2739
+ onclick="popupCode('Image.src/M000326.html');return false;">
2740
+ <span class="method-name">gradient</span><span class="method-args">(...)</span>
2741
+ </a>
2742
+ </div>
2743
+
2744
+ <div class="method-description">
2745
+ <p>
2746
+ Fill a rectangle with the given <a
2747
+ href="Gradient.html">Imlib2::Gradient</a> at a given angle
2748
+ </p>
2749
+ <p>
2750
+ Examples:
2751
+ </p>
2752
+ <pre>
2753
+ x, y, w, h = 10, 10, image.width - 20, image.height - 20
2754
+ angle = 45.2
2755
+ image.fill_gradient gradient, x, y, w, h, angle
2756
+
2757
+ rect = [5, 5, 500, 20]
2758
+ image.gradient gradient, rect, 36.8
2759
+ </pre>
2760
+ </div>
2761
+ </div>
2762
+
2763
+ <div id="method-M000247" class="method-detail">
2764
+ <a name="M000247"></a>
2765
+
2766
+ <div class="method-heading">
2767
+ <a href="Image.src/M000247.html" target="Code" class="method-signature"
2768
+ onclick="popupCode('Image.src/M000247.html');return false;">
2769
+ <span class="method-name">h</span><span class="method-args">()</span>
2770
+ </a>
2771
+ </div>
2772
+
2773
+ <div class="method-description">
2774
+ <p>
2775
+ Return the height of an <a href="Image.html">Imlib2::Image</a>.
2776
+ </p>
2777
+ <p>
2778
+ Examples:
2779
+ </p>
2780
+ <pre>
2781
+ h = image.height
2782
+ h = image.h
2783
+ </pre>
2784
+ </div>
2785
+ </div>
2786
+
2787
+ <div id="method-M000254" class="method-detail">
2788
+ <a name="M000254"></a>
2789
+
2790
+ <div class="method-heading">
2791
+ <a href="Image.src/M000254.html" target="Code" class="method-signature"
2792
+ onclick="popupCode('Image.src/M000254.html');return false;">
2793
+ <span class="method-name">has_alpha</span><span class="method-args">()</span>
2794
+ </a>
2795
+ </div>
2796
+
2797
+ <div class="method-description">
2798
+ <p>
2799
+ Does this image have transparent or translucent regions?
2800
+ </p>
2801
+ <p>
2802
+ Examples:
2803
+ </p>
2804
+ <pre>
2805
+ if image.has_alpha?
2806
+ puts 'this image has alpha'
2807
+ end
2808
+ </pre>
2809
+ </div>
2810
+ </div>
2811
+
2812
+ <div id="method-M000256" class="method-detail">
2813
+ <a name="M000256"></a>
2814
+
2815
+ <div class="method-heading">
2816
+ <a href="Image.src/M000256.html" target="Code" class="method-signature"
2817
+ onclick="popupCode('Image.src/M000256.html');return false;">
2818
+ <span class="method-name">has_alpha=</span><span class="method-args">(p1)</span>
2819
+ </a>
2820
+ </div>
2821
+
2822
+ <div class="method-description">
2823
+ <p>
2824
+ Set image alpha transparency.
2825
+ </p>
2826
+ <p>
2827
+ Examples:
2828
+ </p>
2829
+ <pre>
2830
+ image.set_has_alpha true
2831
+ image.has_alpha = true
2832
+ </pre>
2833
+ </div>
2834
+ </div>
2835
+
2836
+ <div id="method-M000255" class="method-detail">
2837
+ <a name="M000255"></a>
2838
+
2839
+ <div class="method-heading">
2840
+ <a href="Image.src/M000255.html" target="Code" class="method-signature"
2841
+ onclick="popupCode('Image.src/M000255.html');return false;">
2842
+ <span class="method-name">has_alpha?</span><span class="method-args">()</span>
2843
+ </a>
2844
+ </div>
2845
+
2846
+ <div class="method-description">
2847
+ <p>
2848
+ Does this image have transparent or translucent regions?
2849
+ </p>
2850
+ <p>
2851
+ Examples:
2852
+ </p>
2853
+ <pre>
2854
+ if image.has_alpha?
2855
+ puts 'this image has alpha'
2856
+ end
2857
+ </pre>
2858
+ </div>
2859
+ </div>
2860
+
2861
+ <div id="method-M000246" class="method-detail">
2862
+ <a name="M000246"></a>
2863
+
2864
+ <div class="method-heading">
2865
+ <a href="Image.src/M000246.html" target="Code" class="method-signature"
2866
+ onclick="popupCode('Image.src/M000246.html');return false;">
2867
+ <span class="method-name">height</span><span class="method-args">()</span>
2868
+ </a>
2869
+ </div>
2870
+
2871
+ <div class="method-description">
2872
+ <p>
2873
+ Return the height of an <a href="Image.html">Imlib2::Image</a>.
2874
+ </p>
2875
+ <p>
2876
+ Examples:
2877
+ </p>
2878
+ <pre>
2879
+ h = image.height
2880
+ h = image.h
2881
+ </pre>
2882
+ </div>
2883
+ </div>
2884
+
2885
+ <div id="method-M000272" class="method-detail">
2886
+ <a name="M000272"></a>
2887
+
2888
+ <div class="method-heading">
2889
+ <a href="Image.src/M000272.html" target="Code" class="method-signature"
2890
+ onclick="popupCode('Image.src/M000272.html');return false;">
2891
+ <span class="method-name">irrelevant_alpha=</span><span class="method-args">(p1)</span>
2892
+ </a>
2893
+ </div>
2894
+
2895
+ <div class="method-description">
2896
+ <p>
2897
+ Set the irrelevant_alpha flag of an <a href="Image.html">Imlib2::Image</a>
2898
+ </p>
2899
+ <p>
2900
+ Examples:
2901
+ </p>
2902
+ <pre>
2903
+ image.set_irrelevant_alpha true
2904
+ image.irrelevant_alpha = true
2905
+ </pre>
2906
+ </div>
2907
+ </div>
2908
+
2909
+ <div id="method-M000270" class="method-detail">
2910
+ <a name="M000270"></a>
2911
+
2912
+ <div class="method-heading">
2913
+ <a href="Image.src/M000270.html" target="Code" class="method-signature"
2914
+ onclick="popupCode('Image.src/M000270.html');return false;">
2915
+ <span class="method-name">irrelevant_border=</span><span class="method-args">(p1)</span>
2916
+ </a>
2917
+ </div>
2918
+
2919
+ <div class="method-description">
2920
+ <p>
2921
+ Set the irrelevant_border flag of an <a href="Image.html">Imlib2::Image</a>
2922
+ </p>
2923
+ <p>
2924
+ Examples:
2925
+ </p>
2926
+ <pre>
2927
+ image.set_irrelevant_border true
2928
+ image.irrelevant_border = true
2929
+ </pre>
2930
+ </div>
2931
+ </div>
2932
+
2933
+ <div id="method-M000268" class="method-detail">
2934
+ <a name="M000268"></a>
2935
+
2936
+ <div class="method-heading">
2937
+ <a href="Image.src/M000268.html" target="Code" class="method-signature"
2938
+ onclick="popupCode('Image.src/M000268.html');return false;">
2939
+ <span class="method-name">irrelevant_format=</span><span class="method-args">(p1)</span>
2940
+ </a>
2941
+ </div>
2942
+
2943
+ <div class="method-description">
2944
+ <p>
2945
+ Set the irrelevant_format flag of an <a href="Image.html">Imlib2::Image</a>
2946
+ </p>
2947
+ <p>
2948
+ Examples:
2949
+ </p>
2950
+ <pre>
2951
+ image.set_irrelevant_format true
2952
+ image.irrelevant_format = true
2953
+ </pre>
2954
+ </div>
2955
+ </div>
2956
+
2957
+ <div id="method-M000298" class="method-detail">
2958
+ <a name="M000298"></a>
2959
+
2960
+ <div class="method-heading">
2961
+ <a href="Image.src/M000298.html" target="Code" class="method-signature"
2962
+ onclick="popupCode('Image.src/M000298.html');return false;">
2963
+ <span class="method-name">orientate</span><span class="method-args">(p1)</span>
2964
+ </a>
2965
+ </div>
2966
+
2967
+ <div class="method-description">
2968
+ <p>
2969
+ Return a copy of an image rotated in 90 degree increments
2970
+ </p>
2971
+ <p>
2972
+ Examples:
2973
+ </p>
2974
+ <pre>
2975
+ increments = 3 # 90 * 3 degrees (eg 270 degrees)
2976
+ new_image = old_image.orientate increments
2977
+ </pre>
2978
+ </div>
2979
+ </div>
2980
+
2981
+ <div id="method-M000299" class="method-detail">
2982
+ <a name="M000299"></a>
2983
+
2984
+ <div class="method-heading">
2985
+ <a href="Image.src/M000299.html" target="Code" class="method-signature"
2986
+ onclick="popupCode('Image.src/M000299.html');return false;">
2987
+ <span class="method-name">orientate!</span><span class="method-args">(p1)</span>
2988
+ </a>
2989
+ </div>
2990
+
2991
+ <div class="method-description">
2992
+ <p>
2993
+ Rotate an image in 90 degree increments
2994
+ </p>
2995
+ <p>
2996
+ Examples:
2997
+ </p>
2998
+ <pre>
2999
+ increments = 3 # 90 * 3 degrees (eg 270 degrees)
3000
+ image.orientate! increments
3001
+ </pre>
3002
+ </div>
3003
+ </div>
3004
+
3005
+ <div id="method-M000274" class="method-detail">
3006
+ <a name="M000274"></a>
3007
+
3008
+ <div class="method-heading">
3009
+ <a href="Image.src/M000274.html" target="Code" class="method-signature"
3010
+ onclick="popupCode('Image.src/M000274.html');return false;">
3011
+ <span class="method-name">pixel</span><span class="method-args">(p1, p2)</span>
3012
+ </a>
3013
+ </div>
3014
+
3015
+ <div class="method-description">
3016
+ <p>
3017
+ Get the <a href="Color/RgbaColor.html">Imlib2::Color::RgbaColor</a> value
3018
+ of the pixel at x, y
3019
+ </p>
3020
+ <p>
3021
+ Examples:
3022
+ </p>
3023
+ <pre>
3024
+ color = image.query_pixel 320, 240
3025
+ color = image.pixel 320, 240
3026
+ </pre>
3027
+ </div>
3028
+ </div>
3029
+
3030
+ <div id="method-M000282" class="method-detail">
3031
+ <a name="M000282"></a>
3032
+
3033
+ <div class="method-heading">
3034
+ <a href="Image.src/M000282.html" target="Code" class="method-signature"
3035
+ onclick="popupCode('Image.src/M000282.html');return false;">
3036
+ <span class="method-name">pixel_cmya</span><span class="method-args">(p1, p2)</span>
3037
+ </a>
3038
+ </div>
3039
+
3040
+ <div class="method-description">
3041
+ <p>
3042
+ Get the <a href="Color/CmyaColor.html">Imlib2::Color::CmyaColor</a> value
3043
+ of the pixel at x, y
3044
+ </p>
3045
+ <p>
3046
+ Examples:
3047
+ </p>
3048
+ <pre>
3049
+ color = image.query_pixel_cmya 320, 240
3050
+ color = image.pixel_cmya 320, 240
3051
+ </pre>
3052
+ </div>
3053
+ </div>
3054
+
3055
+ <div id="method-M000280" class="method-detail">
3056
+ <a name="M000280"></a>
3057
+
3058
+ <div class="method-heading">
3059
+ <a href="Image.src/M000280.html" target="Code" class="method-signature"
3060
+ onclick="popupCode('Image.src/M000280.html');return false;">
3061
+ <span class="method-name">pixel_hlsa</span><span class="method-args">(p1, p2)</span>
3062
+ </a>
3063
+ </div>
3064
+
3065
+ <div class="method-description">
3066
+ <p>
3067
+ Get the <a href="Color/HlsaColor.html">Imlib2::Color::HlsaColor</a> value
3068
+ of the pixel at x, y
3069
+ </p>
3070
+ <p>
3071
+ Examples:
3072
+ </p>
3073
+ <pre>
3074
+ color = image.query_pixel_hlsa 320, 240
3075
+ color = image.pixel_hlsa 320, 240
3076
+ </pre>
3077
+ </div>
3078
+ </div>
3079
+
3080
+ <div id="method-M000278" class="method-detail">
3081
+ <a name="M000278"></a>
3082
+
3083
+ <div class="method-heading">
3084
+ <a href="Image.src/M000278.html" target="Code" class="method-signature"
3085
+ onclick="popupCode('Image.src/M000278.html');return false;">
3086
+ <span class="method-name">pixel_hsva</span><span class="method-args">(p1, p2)</span>
3087
+ </a>
3088
+ </div>
3089
+
3090
+ <div class="method-description">
3091
+ <p>
3092
+ Get the <a href="Color/HsvaColor.html">Imlib2::Color::HsvaColor</a> value
3093
+ of the pixel at x, y
3094
+ </p>
3095
+ <p>
3096
+ Examples:
3097
+ </p>
3098
+ <pre>
3099
+ color = image.query_pixel_hsva 320, 240
3100
+ color = image.pixel_hsva 320, 240
3101
+ </pre>
3102
+ </div>
3103
+ </div>
3104
+
3105
+ <div id="method-M000275" class="method-detail">
3106
+ <a name="M000275"></a>
3107
+
3108
+ <div class="method-heading">
3109
+ <a href="Image.src/M000275.html" target="Code" class="method-signature"
3110
+ onclick="popupCode('Image.src/M000275.html');return false;">
3111
+ <span class="method-name">pixel_rgba</span><span class="method-args">(p1, p2)</span>
3112
+ </a>
3113
+ </div>
3114
+
3115
+ <div class="method-description">
3116
+ <p>
3117
+ Get the <a href="Color/RgbaColor.html">Imlib2::Color::RgbaColor</a> value
3118
+ of the pixel at x, y
3119
+ </p>
3120
+ <p>
3121
+ Examples:
3122
+ </p>
3123
+ <pre>
3124
+ color = image.query_pixel 320, 240
3125
+ color = image.pixel 320, 240
3126
+ </pre>
3127
+ </div>
3128
+ </div>
3129
+
3130
+ <div id="method-M000358" class="method-detail">
3131
+ <a name="M000358"></a>
3132
+
3133
+ <div class="method-heading">
3134
+ <span class="method-name">pixmap</span><span class="method-args">(...)</span>
3135
+ </div>
3136
+
3137
+ <div class="method-description">
3138
+ </div>
3139
+ </div>
3140
+
3141
+ <div id="method-M000253" class="method-detail">
3142
+ <a name="M000253"></a>
3143
+
3144
+ <div class="method-heading">
3145
+ <a href="Image.src/M000253.html" target="Code" class="method-signature"
3146
+ onclick="popupCode('Image.src/M000253.html');return false;">
3147
+ <span class="method-name">put_back_data</span><span class="method-args">(p1)</span>
3148
+ </a>
3149
+ </div>
3150
+
3151
+ <div class="method-description">
3152
+ <p>
3153
+ Fill an image using raw 32-bit data.
3154
+ </p>
3155
+ <p>
3156
+ Note: The new data buffer must be the same size (in bytes) as the original
3157
+ data buffer.
3158
+ </p>
3159
+ <p>
3160
+ Examples:
3161
+ </p>
3162
+ <pre>
3163
+ RAW_DATA = other_image.data!
3164
+ image.put_data RAW_DATA
3165
+
3166
+ RAW_DATA = other_image.data!
3167
+ image.data = RAW_DATA
3168
+ </pre>
3169
+ </div>
3170
+ </div>
3171
+
3172
+ <div id="method-M000276" class="method-detail">
3173
+ <a name="M000276"></a>
3174
+
3175
+ <div class="method-heading">
3176
+ <a href="Image.src/M000276.html" target="Code" class="method-signature"
3177
+ onclick="popupCode('Image.src/M000276.html');return false;">
3178
+ <span class="method-name">query_pixel</span><span class="method-args">(p1, p2)</span>
3179
+ </a>
3180
+ </div>
3181
+
3182
+ <div class="method-description">
3183
+ <p>
3184
+ Get the <a href="Color/RgbaColor.html">Imlib2::Color::RgbaColor</a> value
3185
+ of the pixel at x, y
3186
+ </p>
3187
+ <p>
3188
+ Examples:
3189
+ </p>
3190
+ <pre>
3191
+ color = image.query_pixel 320, 240
3192
+ color = image.pixel 320, 240
3193
+ </pre>
3194
+ </div>
3195
+ </div>
3196
+
3197
+ <div id="method-M000283" class="method-detail">
3198
+ <a name="M000283"></a>
3199
+
3200
+ <div class="method-heading">
3201
+ <a href="Image.src/M000283.html" target="Code" class="method-signature"
3202
+ onclick="popupCode('Image.src/M000283.html');return false;">
3203
+ <span class="method-name">query_pixel_cmya</span><span class="method-args">(p1, p2)</span>
3204
+ </a>
3205
+ </div>
3206
+
3207
+ <div class="method-description">
3208
+ <p>
3209
+ Get the <a href="Color/CmyaColor.html">Imlib2::Color::CmyaColor</a> value
3210
+ of the pixel at x, y
3211
+ </p>
3212
+ <p>
3213
+ Examples:
3214
+ </p>
3215
+ <pre>
3216
+ color = image.query_pixel_cmya 320, 240
3217
+ color = image.pixel_cmya 320, 240
3218
+ </pre>
3219
+ </div>
3220
+ </div>
3221
+
3222
+ <div id="method-M000281" class="method-detail">
3223
+ <a name="M000281"></a>
3224
+
3225
+ <div class="method-heading">
3226
+ <a href="Image.src/M000281.html" target="Code" class="method-signature"
3227
+ onclick="popupCode('Image.src/M000281.html');return false;">
3228
+ <span class="method-name">query_pixel_hlsa</span><span class="method-args">(p1, p2)</span>
3229
+ </a>
3230
+ </div>
3231
+
3232
+ <div class="method-description">
3233
+ <p>
3234
+ Get the <a href="Color/HlsaColor.html">Imlib2::Color::HlsaColor</a> value
3235
+ of the pixel at x, y
3236
+ </p>
3237
+ <p>
3238
+ Examples:
3239
+ </p>
3240
+ <pre>
3241
+ color = image.query_pixel_hlsa 320, 240
3242
+ color = image.pixel_hlsa 320, 240
3243
+ </pre>
3244
+ </div>
3245
+ </div>
3246
+
3247
+ <div id="method-M000279" class="method-detail">
3248
+ <a name="M000279"></a>
3249
+
3250
+ <div class="method-heading">
3251
+ <a href="Image.src/M000279.html" target="Code" class="method-signature"
3252
+ onclick="popupCode('Image.src/M000279.html');return false;">
3253
+ <span class="method-name">query_pixel_hsva</span><span class="method-args">(p1, p2)</span>
3254
+ </a>
3255
+ </div>
3256
+
3257
+ <div class="method-description">
3258
+ <p>
3259
+ Get the <a href="Color/HsvaColor.html">Imlib2::Color::HsvaColor</a> value
3260
+ of the pixel at x, y
3261
+ </p>
3262
+ <p>
3263
+ Examples:
3264
+ </p>
3265
+ <pre>
3266
+ color = image.query_pixel_hsva 320, 240
3267
+ color = image.pixel_hsva 320, 240
3268
+ </pre>
3269
+ </div>
3270
+ </div>
3271
+
3272
+ <div id="method-M000277" class="method-detail">
3273
+ <a name="M000277"></a>
3274
+
3275
+ <div class="method-heading">
3276
+ <a href="Image.src/M000277.html" target="Code" class="method-signature"
3277
+ onclick="popupCode('Image.src/M000277.html');return false;">
3278
+ <span class="method-name">query_pixel_rgba</span><span class="method-args">(p1, p2)</span>
3279
+ </a>
3280
+ </div>
3281
+
3282
+ <div class="method-description">
3283
+ <p>
3284
+ Get the <a href="Color/RgbaColor.html">Imlib2::Color::RgbaColor</a> value
3285
+ of the pixel at x, y
3286
+ </p>
3287
+ <p>
3288
+ Examples:
3289
+ </p>
3290
+ <pre>
3291
+ color = image.query_pixel 320, 240
3292
+ color = image.pixel 320, 240
3293
+ </pre>
3294
+ </div>
3295
+ </div>
3296
+
3297
+ <div id="method-M000354" class="method-detail">
3298
+ <a name="M000354"></a>
3299
+
3300
+ <div class="method-heading">
3301
+ <a href="Image.src/M000354.html" target="Code" class="method-signature"
3302
+ onclick="popupCode('Image.src/M000354.html');return false;">
3303
+ <span class="method-name">remove_attached_value</span><span class="method-args">(p1)</span>
3304
+ </a>
3305
+ </div>
3306
+
3307
+ <div class="method-description">
3308
+ <p>
3309
+ Remove an integer value attached to an <a
3310
+ href="Image.html">Imlib2::Image</a>.
3311
+ </p>
3312
+ <p>
3313
+ Examples:
3314
+ </p>
3315
+ <pre>
3316
+ image.remove_attached_value('quality')
3317
+ </pre>
3318
+ </div>
3319
+ </div>
3320
+
3321
+ <div id="method-M000359" class="method-detail">
3322
+ <a name="M000359"></a>
3323
+
3324
+ <div class="method-heading">
3325
+ <span class="method-name">render_on_drawable</span><span class="method-args">(...)</span>
3326
+ </div>
3327
+
3328
+ <div class="method-description">
3329
+ </div>
3330
+ </div>
3331
+
3332
+ <div id="method-M000365" class="method-detail">
3333
+ <a name="M000365"></a>
3334
+
3335
+ <div class="method-heading">
3336
+ <span class="method-name">render_on_drawable_at_angle</span><span class="method-args">(...)</span>
3337
+ </div>
3338
+
3339
+ <div class="method-description">
3340
+ </div>
3341
+ </div>
3342
+
3343
+ <div id="method-M000364" class="method-detail">
3344
+ <a name="M000364"></a>
3345
+
3346
+ <div class="method-heading">
3347
+ <span class="method-name">render_on_drawable_skewed</span><span class="method-args">(...)</span>
3348
+ </div>
3349
+
3350
+ <div class="method-description">
3351
+ </div>
3352
+ </div>
3353
+
3354
+ <div id="method-M000357" class="method-detail">
3355
+ <a name="M000357"></a>
3356
+
3357
+ <div class="method-heading">
3358
+ <span class="method-name">render_pixmap</span><span class="method-args">(...)</span>
3359
+ </div>
3360
+
3361
+ <div class="method-description">
3362
+ </div>
3363
+ </div>
3364
+
3365
+ <div id="method-M000338" class="method-detail">
3366
+ <a name="M000338"></a>
3367
+
3368
+ <div class="method-heading">
3369
+ <a href="Image.src/M000338.html" target="Code" class="method-signature"
3370
+ onclick="popupCode('Image.src/M000338.html');return false;">
3371
+ <span class="method-name">rotate</span><span class="method-args">(p1)</span>
3372
+ </a>
3373
+ </div>
3374
+
3375
+ <div class="method-description">
3376
+ <p>
3377
+ Return a rotated copy of the image
3378
+ </p>
3379
+ <p>
3380
+ Examples:
3381
+ </p>
3382
+ <pre>
3383
+ new_image = old_image.rotate 37.2
3384
+ </pre>
3385
+ </div>
3386
+ </div>
3387
+
3388
+ <div id="method-M000339" class="method-detail">
3389
+ <a name="M000339"></a>
3390
+
3391
+ <div class="method-heading">
3392
+ <a href="Image.src/M000339.html" target="Code" class="method-signature"
3393
+ onclick="popupCode('Image.src/M000339.html');return false;">
3394
+ <span class="method-name">rotate!</span><span class="method-args">(p1)</span>
3395
+ </a>
3396
+ </div>
3397
+
3398
+ <div class="method-description">
3399
+ <p>
3400
+ Rotates the image
3401
+ </p>
3402
+ <p>
3403
+ Examples:
3404
+ </p>
3405
+ <pre>
3406
+ image.rotate! 37.2
3407
+ </pre>
3408
+ </div>
3409
+ </div>
3410
+
3411
+ <div id="method-M000240" class="method-detail">
3412
+ <a name="M000240"></a>
3413
+
3414
+ <div class="method-heading">
3415
+ <a href="Image.src/M000240.html" target="Code" class="method-signature"
3416
+ onclick="popupCode('Image.src/M000240.html');return false;">
3417
+ <span class="method-name">save</span><span class="method-args">(p1)</span>
3418
+ </a>
3419
+ </div>
3420
+
3421
+ <div class="method-description">
3422
+ <p>
3423
+ Save an <a href="Image.html">Imlib2::Image</a> to a file (throws an
3424
+ exception on error).
3425
+ </p>
3426
+ <p>
3427
+ Examples:
3428
+ </p>
3429
+ <pre>
3430
+ image.save 'output_file.png'
3431
+
3432
+ filename = 'output_file.jpg'
3433
+ begin
3434
+ image.save filename
3435
+ rescue Imlib2::FileError
3436
+ $stderr.puts &quot;Couldn't save file \&quot;#{filename}\&quot;: &quot; + $!
3437
+ end
3438
+ </pre>
3439
+ </div>
3440
+ </div>
3441
+
3442
+ <div id="method-M000241" class="method-detail">
3443
+ <a name="M000241"></a>
3444
+
3445
+ <div class="method-heading">
3446
+ <a href="Image.src/M000241.html" target="Code" class="method-signature"
3447
+ onclick="popupCode('Image.src/M000241.html');return false;">
3448
+ <span class="method-name">save_image</span><span class="method-args">(p1)</span>
3449
+ </a>
3450
+ </div>
3451
+
3452
+ <div class="method-description">
3453
+ <p>
3454
+ Save an <a href="Image.html">Imlib2::Image</a> to a file (no exception or
3455
+ error).
3456
+ </p>
3457
+ <p>
3458
+ Provides access to the low-level imlib_save_image() call. You probably want
3459
+ to use Imlib2::Image::save() instead.
3460
+ </p>
3461
+ <p>
3462
+ Examples:
3463
+ </p>
3464
+ <pre>
3465
+ image.save_image 'output_file.png'
3466
+ </pre>
3467
+ </div>
3468
+ </div>
3469
+
3470
+ <div id="method-M000242" class="method-detail">
3471
+ <a name="M000242"></a>
3472
+
3473
+ <div class="method-heading">
3474
+ <a href="Image.src/M000242.html" target="Code" class="method-signature"
3475
+ onclick="popupCode('Image.src/M000242.html');return false;">
3476
+ <span class="method-name">save_with_error_return</span><span class="method-args">(p1)</span>
3477
+ </a>
3478
+ </div>
3479
+
3480
+ <div class="method-description">
3481
+ <p>
3482
+ Save an <a href="Image.html">Imlib2::Image</a> to a file (error returned as
3483
+ number).
3484
+ </p>
3485
+ <p>
3486
+ Provides access to the low-level imlib_save_image_with_error_return() call.
3487
+ You probably want to use Imlib2::Image::save() instead.
3488
+ </p>
3489
+ <p>
3490
+ Examples:
3491
+ </p>
3492
+ <pre>
3493
+ error = image.save_with_error_return 'output_file.png'
3494
+ puts 'an error occurred' unless error == 0
3495
+ </pre>
3496
+ </div>
3497
+ </div>
3498
+
3499
+ <div id="method-M000348" class="method-detail">
3500
+ <a name="M000348"></a>
3501
+
3502
+ <div class="method-heading">
3503
+ <a href="Image.src/M000348.html" target="Code" class="method-signature"
3504
+ onclick="popupCode('Image.src/M000348.html');return false;">
3505
+ <span class="method-name">script_filter</span><span class="method-args">(p1)</span>
3506
+ </a>
3507
+ </div>
3508
+
3509
+ <div class="method-description">
3510
+ <p>
3511
+ Apply a scripted filter
3512
+ </p>
3513
+ <p>
3514
+ You should probably using <a
3515
+ href="Image.html#M000345">Imlib2::Image#filter</a>() instead, since it is
3516
+ polymorphic (eg, it can handle both static and scripted filters).
3517
+ </p>
3518
+ <p>
3519
+ Example:
3520
+ </p>
3521
+ <pre>
3522
+ x, y = 20, 10
3523
+ filter_string = &quot;tint( x=#{x}, y=#{y}, red=255, alpha=55 );&quot;
3524
+ image.script_filter filter_string
3525
+ </pre>
3526
+ </div>
3527
+ </div>
3528
+
3529
+ <div id="method-M000319" class="method-detail">
3530
+ <a name="M000319"></a>
3531
+
3532
+ <div class="method-heading">
3533
+ <a href="Image.src/M000319.html" target="Code" class="method-signature"
3534
+ onclick="popupCode('Image.src/M000319.html');return false;">
3535
+ <span class="method-name">scroll_rect</span><span class="method-args">(...)</span>
3536
+ </a>
3537
+ </div>
3538
+
3539
+ <div class="method-description">
3540
+ <p>
3541
+ Scroll a rectangle to the specified coordinates
3542
+ </p>
3543
+ <p>
3544
+ Examples:
3545
+ </p>
3546
+ <pre>
3547
+ x, y, w, h = 10, 20, 100, 200
3548
+ dest_x, dest_y = 5, 10
3549
+ image.scroll_rect x, y, w, h, dest_x, dest_y
3550
+
3551
+ source_rect = [10, 20, 100, 200]
3552
+ dest_coords = [5, 10]
3553
+ image.scroll_rect source_rect, dest_coords
3554
+
3555
+ values = [10, 20, 100, 200, 5, 10]
3556
+ image.scroll_rect values
3557
+ </pre>
3558
+ </div>
3559
+ </div>
3560
+
3561
+ <div id="method-M000263" class="method-detail">
3562
+ <a name="M000263"></a>
3563
+
3564
+ <div class="method-heading">
3565
+ <a href="Image.src/M000263.html" target="Code" class="method-signature"
3566
+ onclick="popupCode('Image.src/M000263.html');return false;">
3567
+ <span class="method-name">set_border</span><span class="method-args">(p1)</span>
3568
+ </a>
3569
+ </div>
3570
+
3571
+ <div class="method-description">
3572
+ <p>
3573
+ Set the <a href="Border.html">Imlib2::Border</a> of an <a
3574
+ href="Image.html">Imlib2::Image</a>
3575
+ </p>
3576
+ <p>
3577
+ Examples:
3578
+ </p>
3579
+ <pre>
3580
+ image.set_border border
3581
+ image.border = border
3582
+ </pre>
3583
+ </div>
3584
+ </div>
3585
+
3586
+ <div id="method-M000259" class="method-detail">
3587
+ <a name="M000259"></a>
3588
+
3589
+ <div class="method-heading">
3590
+ <a href="Image.src/M000259.html" target="Code" class="method-signature"
3591
+ onclick="popupCode('Image.src/M000259.html');return false;">
3592
+ <span class="method-name">set_changes_on_disk</span><span class="method-args">()</span>
3593
+ </a>
3594
+ </div>
3595
+
3596
+ <div class="method-description">
3597
+ <p>
3598
+ Flag this image as changing on disk
3599
+ </p>
3600
+ <p>
3601
+ Examples:
3602
+ </p>
3603
+ <pre>
3604
+ image.changes_on_disk
3605
+ </pre>
3606
+ </div>
3607
+ </div>
3608
+
3609
+ <div id="method-M000267" class="method-detail">
3610
+ <a name="M000267"></a>
3611
+
3612
+ <div class="method-heading">
3613
+ <a href="Image.src/M000267.html" target="Code" class="method-signature"
3614
+ onclick="popupCode('Image.src/M000267.html');return false;">
3615
+ <span class="method-name">set_format</span><span class="method-args">(p1)</span>
3616
+ </a>
3617
+ </div>
3618
+
3619
+ <div class="method-description">
3620
+ <p>
3621
+ Set the on-disk format of an <a href="Image.html">Imlib2::Image</a>
3622
+ </p>
3623
+ <p>
3624
+ Examples:
3625
+ </p>
3626
+ <pre>
3627
+ image.get_format 'png'
3628
+ image.format = 'png'
3629
+ </pre>
3630
+ </div>
3631
+ </div>
3632
+
3633
+ <div id="method-M000257" class="method-detail">
3634
+ <a name="M000257"></a>
3635
+
3636
+ <div class="method-heading">
3637
+ <a href="Image.src/M000257.html" target="Code" class="method-signature"
3638
+ onclick="popupCode('Image.src/M000257.html');return false;">
3639
+ <span class="method-name">set_has_alpha</span><span class="method-args">(p1)</span>
3640
+ </a>
3641
+ </div>
3642
+
3643
+ <div class="method-description">
3644
+ <p>
3645
+ Set image alpha transparency.
3646
+ </p>
3647
+ <p>
3648
+ Examples:
3649
+ </p>
3650
+ <pre>
3651
+ image.set_has_alpha true
3652
+ image.has_alpha = true
3653
+ </pre>
3654
+ </div>
3655
+ </div>
3656
+
3657
+ <div id="method-M000273" class="method-detail">
3658
+ <a name="M000273"></a>
3659
+
3660
+ <div class="method-heading">
3661
+ <a href="Image.src/M000273.html" target="Code" class="method-signature"
3662
+ onclick="popupCode('Image.src/M000273.html');return false;">
3663
+ <span class="method-name">set_irrelevant_alpha</span><span class="method-args">(p1)</span>
3664
+ </a>
3665
+ </div>
3666
+
3667
+ <div class="method-description">
3668
+ <p>
3669
+ Set the irrelevant_alpha flag of an <a href="Image.html">Imlib2::Image</a>
3670
+ </p>
3671
+ <p>
3672
+ Examples:
3673
+ </p>
3674
+ <pre>
3675
+ image.set_irrelevant_alpha true
3676
+ image.irrelevant_alpha = true
3677
+ </pre>
3678
+ </div>
3679
+ </div>
3680
+
3681
+ <div id="method-M000271" class="method-detail">
3682
+ <a name="M000271"></a>
3683
+
3684
+ <div class="method-heading">
3685
+ <a href="Image.src/M000271.html" target="Code" class="method-signature"
3686
+ onclick="popupCode('Image.src/M000271.html');return false;">
3687
+ <span class="method-name">set_irrelevant_border</span><span class="method-args">(p1)</span>
3688
+ </a>
3689
+ </div>
3690
+
3691
+ <div class="method-description">
3692
+ <p>
3693
+ Set the irrelevant_border flag of an <a href="Image.html">Imlib2::Image</a>
3694
+ </p>
3695
+ <p>
3696
+ Examples:
3697
+ </p>
3698
+ <pre>
3699
+ image.set_irrelevant_border true
3700
+ image.irrelevant_border = true
3701
+ </pre>
3702
+ </div>
3703
+ </div>
3704
+
3705
+ <div id="method-M000269" class="method-detail">
3706
+ <a name="M000269"></a>
3707
+
3708
+ <div class="method-heading">
3709
+ <a href="Image.src/M000269.html" target="Code" class="method-signature"
3710
+ onclick="popupCode('Image.src/M000269.html');return false;">
3711
+ <span class="method-name">set_irrelevant_format</span><span class="method-args">(p1)</span>
3712
+ </a>
3713
+ </div>
3714
+
3715
+ <div class="method-description">
3716
+ <p>
3717
+ Set the irrelevant_format flag of an <a href="Image.html">Imlib2::Image</a>
3718
+ </p>
3719
+ <p>
3720
+ Examples:
3721
+ </p>
3722
+ <pre>
3723
+ image.set_irrelevant_format true
3724
+ image.irrelevant_format = true
3725
+ </pre>
3726
+ </div>
3727
+ </div>
3728
+
3729
+ <div id="method-M000302" class="method-detail">
3730
+ <a name="M000302"></a>
3731
+
3732
+ <div class="method-heading">
3733
+ <a href="Image.src/M000302.html" target="Code" class="method-signature"
3734
+ onclick="popupCode('Image.src/M000302.html');return false;">
3735
+ <span class="method-name">sharpen</span><span class="method-args">(p1)</span>
3736
+ </a>
3737
+ </div>
3738
+
3739
+ <div class="method-description">
3740
+ <p>
3741
+ Return a sharpened copy of an image
3742
+ </p>
3743
+ <p>
3744
+ Examples:
3745
+ </p>
3746
+ <pre>
3747
+ radius = 15 # radius of sharpen, in pixels
3748
+ new_image = old_image.sharpen radius
3749
+ </pre>
3750
+ </div>
3751
+ </div>
3752
+
3753
+ <div id="method-M000303" class="method-detail">
3754
+ <a name="M000303"></a>
3755
+
3756
+ <div class="method-heading">
3757
+ <a href="Image.src/M000303.html" target="Code" class="method-signature"
3758
+ onclick="popupCode('Image.src/M000303.html');return false;">
3759
+ <span class="method-name">sharpen!</span><span class="method-args">(p1)</span>
3760
+ </a>
3761
+ </div>
3762
+
3763
+ <div class="method-description">
3764
+ <p>
3765
+ Sharpened an image
3766
+ </p>
3767
+ <p>
3768
+ Examples:
3769
+ </p>
3770
+ <pre>
3771
+ radius = 15 # radius of sharpen, in pixels
3772
+ image.sharpen! radius
3773
+ </pre>
3774
+ </div>
3775
+ </div>
3776
+
3777
+ <div id="method-M000347" class="method-detail">
3778
+ <a name="M000347"></a>
3779
+
3780
+ <div class="method-heading">
3781
+ <a href="Image.src/M000347.html" target="Code" class="method-signature"
3782
+ onclick="popupCode('Image.src/M000347.html');return false;">
3783
+ <span class="method-name">static_filter</span><span class="method-args">(p1)</span>
3784
+ </a>
3785
+ </div>
3786
+
3787
+ <div class="method-description">
3788
+ <p>
3789
+ Apply an <a href="Filter.html">Imlib2::Filter</a> (eg a static filter)
3790
+ </p>
3791
+ <p>
3792
+ You should probably using <a
3793
+ href="Image.html#M000345">Imlib2::Image#filter</a>() instead, since it is
3794
+ polymorphic (eg, it can handle both static and scripted filters).
3795
+ </p>
3796
+ <p>
3797
+ Example:
3798
+ </p>
3799
+ <pre>
3800
+ filter = Imlib2::Filter.new 20
3801
+ filter.set 2, 2, Imlib2::Color::GREEN
3802
+ image.static_filter filter
3803
+ </pre>
3804
+ </div>
3805
+ </div>
3806
+
3807
+ <div id="method-M000308" class="method-detail">
3808
+ <a name="M000308"></a>
3809
+
3810
+ <div class="method-heading">
3811
+ <a href="Image.src/M000308.html" target="Code" class="method-signature"
3812
+ onclick="popupCode('Image.src/M000308.html');return false;">
3813
+ <span class="method-name">tile</span><span class="method-args">()</span>
3814
+ </a>
3815
+ </div>
3816
+
3817
+ <div class="method-description">
3818
+ <p>
3819
+ Return a copy of an image suitable for seamless tiling
3820
+ </p>
3821
+ <p>
3822
+ Examples:
3823
+ </p>
3824
+ <pre>
3825
+ horiz_tile = old_image.tile
3826
+ </pre>
3827
+ </div>
3828
+ </div>
3829
+
3830
+ <div id="method-M000309" class="method-detail">
3831
+ <a name="M000309"></a>
3832
+
3833
+ <div class="method-heading">
3834
+ <a href="Image.src/M000309.html" target="Code" class="method-signature"
3835
+ onclick="popupCode('Image.src/M000309.html');return false;">
3836
+ <span class="method-name">tile!</span><span class="method-args">()</span>
3837
+ </a>
3838
+ </div>
3839
+
3840
+ <div class="method-description">
3841
+ <p>
3842
+ Modify an image so it is suitable for seamless tiling
3843
+ </p>
3844
+ <p>
3845
+ Examples:
3846
+ </p>
3847
+ <pre>
3848
+ image.tile!
3849
+ </pre>
3850
+ </div>
3851
+ </div>
3852
+
3853
+ <div id="method-M000304" class="method-detail">
3854
+ <a name="M000304"></a>
3855
+
3856
+ <div class="method-heading">
3857
+ <a href="Image.src/M000304.html" target="Code" class="method-signature"
3858
+ onclick="popupCode('Image.src/M000304.html');return false;">
3859
+ <span class="method-name">tile_horizontal</span><span class="method-args">()</span>
3860
+ </a>
3861
+ </div>
3862
+
3863
+ <div class="method-description">
3864
+ <p>
3865
+ Return a copy of an image suitable for seamless horizontal tiling
3866
+ </p>
3867
+ <p>
3868
+ Examples:
3869
+ </p>
3870
+ <pre>
3871
+ horiz_tile = old_image.tile_horizontal
3872
+ </pre>
3873
+ </div>
3874
+ </div>
3875
+
3876
+ <div id="method-M000305" class="method-detail">
3877
+ <a name="M000305"></a>
3878
+
3879
+ <div class="method-heading">
3880
+ <a href="Image.src/M000305.html" target="Code" class="method-signature"
3881
+ onclick="popupCode('Image.src/M000305.html');return false;">
3882
+ <span class="method-name">tile_horizontal!</span><span class="method-args">()</span>
3883
+ </a>
3884
+ </div>
3885
+
3886
+ <div class="method-description">
3887
+ <p>
3888
+ Modify an image so it is suitable for seamless horizontal tiling
3889
+ </p>
3890
+ <p>
3891
+ Examples:
3892
+ </p>
3893
+ <pre>
3894
+ image.tile_horizontal!
3895
+ </pre>
3896
+ </div>
3897
+ </div>
3898
+
3899
+ <div id="method-M000306" class="method-detail">
3900
+ <a name="M000306"></a>
3901
+
3902
+ <div class="method-heading">
3903
+ <a href="Image.src/M000306.html" target="Code" class="method-signature"
3904
+ onclick="popupCode('Image.src/M000306.html');return false;">
3905
+ <span class="method-name">tile_vertical</span><span class="method-args">()</span>
3906
+ </a>
3907
+ </div>
3908
+
3909
+ <div class="method-description">
3910
+ <p>
3911
+ Return a copy of an image suitable for seamless vertical tiling
3912
+ </p>
3913
+ <p>
3914
+ Examples:
3915
+ </p>
3916
+ <pre>
3917
+ vert_tile = old_image.tile_vertical
3918
+ </pre>
3919
+ </div>
3920
+ </div>
3921
+
3922
+ <div id="method-M000307" class="method-detail">
3923
+ <a name="M000307"></a>
3924
+
3925
+ <div class="method-heading">
3926
+ <a href="Image.src/M000307.html" target="Code" class="method-signature"
3927
+ onclick="popupCode('Image.src/M000307.html');return false;">
3928
+ <span class="method-name">tile_vertical!</span><span class="method-args">()</span>
3929
+ </a>
3930
+ </div>
3931
+
3932
+ <div class="method-description">
3933
+ <p>
3934
+ Modify an image so it is suitable for seamless vertical tiling
3935
+ </p>
3936
+ <p>
3937
+ Examples:
3938
+ </p>
3939
+ <pre>
3940
+ image.tile_vertical!
3941
+ </pre>
3942
+ </div>
3943
+ </div>
3944
+
3945
+ <div id="method-M000245" class="method-detail">
3946
+ <a name="M000245"></a>
3947
+
3948
+ <div class="method-heading">
3949
+ <a href="Image.src/M000245.html" target="Code" class="method-signature"
3950
+ onclick="popupCode('Image.src/M000245.html');return false;">
3951
+ <span class="method-name">w</span><span class="method-args">()</span>
3952
+ </a>
3953
+ </div>
3954
+
3955
+ <div class="method-description">
3956
+ <p>
3957
+ Return the width of an <a href="Image.html">Imlib2::Image</a>.
3958
+ </p>
3959
+ <p>
3960
+ Examples:
3961
+ </p>
3962
+ <pre>
3963
+ w = image.width
3964
+ w = image.w
3965
+ </pre>
3966
+ </div>
3967
+ </div>
3968
+
3969
+ <div id="method-M000244" class="method-detail">
3970
+ <a name="M000244"></a>
3971
+
3972
+ <div class="method-heading">
3973
+ <a href="Image.src/M000244.html" target="Code" class="method-signature"
3974
+ onclick="popupCode('Image.src/M000244.html');return false;">
3975
+ <span class="method-name">width</span><span class="method-args">()</span>
3976
+ </a>
3977
+ </div>
3978
+
3979
+ <div class="method-description">
3980
+ <p>
3981
+ Return the width of an <a href="Image.html">Imlib2::Image</a>.
3982
+ </p>
3983
+ <p>
3984
+ Examples:
3985
+ </p>
3986
+ <pre>
3987
+ w = image.width
3988
+ w = image.w
3989
+ </pre>
3990
+ </div>
3991
+ </div>
3992
+
3993
+
3994
+ </div>
3995
+
3996
+
3997
+ </div>
3998
+
3999
+
4000
+ <div id="validator-badges">
4001
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
4002
+ </div>
4003
+
4004
+ </body>
4005
+ </html>