gosu 0.7.19 → 0.7.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. data/Gosu/Input.hpp +12 -8
  2. data/Gosu/Math.hpp +13 -0
  3. data/Gosu/TextInput.hpp +5 -0
  4. data/Gosu/Version.hpp +2 -2
  5. data/GosuImpl/Graphics/TextUnix.cpp +253 -0
  6. data/GosuImpl/InputMac.mm +4 -4
  7. data/GosuImpl/InputWin.cpp +4 -4
  8. data/GosuImpl/InputX.cpp +15 -15
  9. data/GosuImpl/Math.cpp +28 -4
  10. data/GosuImpl/RubyGosu.swg +14 -3
  11. data/GosuImpl/RubyGosuStub.mm +8 -15
  12. data/GosuImpl/RubyGosu_wrap.cxx +113 -6
  13. data/GosuImpl/TextInputMac.mm +10 -1
  14. data/GosuImpl/TextInputWin.cpp +10 -0
  15. data/GosuImpl/TextInputX.cpp +10 -0
  16. data/GosuImpl/WindowMac.mm +15 -4
  17. data/GosuImpl/WindowWin.cpp +16 -7
  18. data/examples/TextInput.rb +15 -0
  19. data/lib/gosu.rb +5 -8
  20. data/linux/extconf.rb +34 -9
  21. metadata +13 -272
  22. data/GosuImpl/Graphics/TextPangoFT.cpp +0 -186
  23. data/Rakefile +0 -314
  24. data/examples/TextInput.cpp +0 -192
  25. data/examples/Tutorial.cpp +0 -215
  26. data/linux/Makefile.in +0 -99
  27. data/linux/configure +0 -5850
  28. data/linux/configure.ac +0 -110
  29. data/reference/cpp/_audio_8hpp-source.html +0 -178
  30. data/reference/cpp/_audio_8hpp.html +0 -100
  31. data/reference/cpp/_audio_8hpp_source.html +0 -170
  32. data/reference/cpp/_auto_link_8hpp-source.html +0 -85
  33. data/reference/cpp/_auto_link_8hpp.html +0 -84
  34. data/reference/cpp/_auto_link_8hpp_source.html +0 -85
  35. data/reference/cpp/_bitmap_8hpp-source.html +0 -131
  36. data/reference/cpp/_bitmap_8hpp.html +0 -114
  37. data/reference/cpp/_bitmap_8hpp_source.html +0 -131
  38. data/reference/cpp/_buttons_mac_8hpp-source.html +0 -206
  39. data/reference/cpp/_buttons_mac_8hpp.html +0 -240
  40. data/reference/cpp/_buttons_mac_8hpp_source.html +0 -206
  41. data/reference/cpp/_color_8hpp-source.html +0 -216
  42. data/reference/cpp/_color_8hpp.html +0 -130
  43. data/reference/cpp/_color_8hpp_source.html +0 -232
  44. data/reference/cpp/_directories_8hpp-source.html +0 -89
  45. data/reference/cpp/_directories_8hpp.html +0 -103
  46. data/reference/cpp/_directories_8hpp_source.html +0 -89
  47. data/reference/cpp/_font_8hpp-source.html +0 -116
  48. data/reference/cpp/_font_8hpp.html +0 -94
  49. data/reference/cpp/_font_8hpp_source.html +0 -116
  50. data/reference/cpp/_fwd_8hpp-source.html +0 -99
  51. data/reference/cpp/_fwd_8hpp.html +0 -90
  52. data/reference/cpp/_fwd_8hpp_source.html +0 -99
  53. data/reference/cpp/_gosu_8hpp-source.html +0 -97
  54. data/reference/cpp/_gosu_8hpp.html +0 -84
  55. data/reference/cpp/_gosu_8hpp_source.html +0 -97
  56. data/reference/cpp/_graphics_8hpp-source.html +0 -135
  57. data/reference/cpp/_graphics_8hpp.html +0 -101
  58. data/reference/cpp/_graphics_8hpp_source.html +0 -144
  59. data/reference/cpp/_graphics_base_8hpp-source.html +0 -116
  60. data/reference/cpp/_graphics_base_8hpp.html +0 -128
  61. data/reference/cpp/_graphics_base_8hpp_source.html +0 -117
  62. data/reference/cpp/_i_o_8hpp-source.html +0 -302
  63. data/reference/cpp/_i_o_8hpp.html +0 -129
  64. data/reference/cpp/_i_o_8hpp_source.html +0 -295
  65. data/reference/cpp/_image_8hpp-source.html +0 -173
  66. data/reference/cpp/_image_8hpp.html +0 -103
  67. data/reference/cpp/_image_8hpp_source.html +0 -176
  68. data/reference/cpp/_image_data_8hpp-source.html +0 -109
  69. data/reference/cpp/_image_data_8hpp.html +0 -97
  70. data/reference/cpp/_image_data_8hpp_source.html +0 -109
  71. data/reference/cpp/_input_8hpp-source.html +0 -183
  72. data/reference/cpp/_input_8hpp.html +0 -109
  73. data/reference/cpp/_input_8hpp_source.html +0 -183
  74. data/reference/cpp/_math_8hpp-source.html +0 -157
  75. data/reference/cpp/_math_8hpp.html +0 -152
  76. data/reference/cpp/_math_8hpp_source.html +0 -157
  77. data/reference/cpp/_platform_8hpp-source.html +0 -134
  78. data/reference/cpp/_platform_8hpp.html +0 -162
  79. data/reference/cpp/_platform_8hpp_source.html +0 -134
  80. data/reference/cpp/_rot_flip_8hpp-source.html +0 -185
  81. data/reference/cpp/_rot_flip_8hpp.html +0 -130
  82. data/reference/cpp/_rot_flip_8hpp_source.html +0 -185
  83. data/reference/cpp/_sockets_8hpp-source.html +0 -175
  84. data/reference/cpp/_sockets_8hpp.html +0 -124
  85. data/reference/cpp/_sockets_8hpp_source.html +0 -175
  86. data/reference/cpp/_text_8hpp-source.html +0 -103
  87. data/reference/cpp/_text_8hpp.html +0 -106
  88. data/reference/cpp/_text_8hpp_source.html +0 -103
  89. data/reference/cpp/_text_input_8hpp-source.html +0 -111
  90. data/reference/cpp/_text_input_8hpp.html +0 -94
  91. data/reference/cpp/_text_input_8hpp_source.html +0 -116
  92. data/reference/cpp/_timing_8hpp-source.html +0 -83
  93. data/reference/cpp/_timing_8hpp.html +0 -97
  94. data/reference/cpp/_timing_8hpp_source.html +0 -83
  95. data/reference/cpp/_utility_8hpp-source.html +0 -90
  96. data/reference/cpp/_utility_8hpp.html +0 -103
  97. data/reference/cpp/_utility_8hpp_source.html +0 -90
  98. data/reference/cpp/_version_8hpp-source.html +0 -78
  99. data/reference/cpp/_version_8hpp.html +0 -154
  100. data/reference/cpp/_version_8hpp_source.html +0 -78
  101. data/reference/cpp/_win_utility_8hpp-source.html +0 -126
  102. data/reference/cpp/_win_utility_8hpp.html +0 -128
  103. data/reference/cpp/_win_utility_8hpp_source.html +0 -126
  104. data/reference/cpp/_window_8hpp-source.html +0 -158
  105. data/reference/cpp/_window_8hpp.html +0 -94
  106. data/reference/cpp/_window_8hpp_source.html +0 -159
  107. data/reference/cpp/annotated.html +0 -98
  108. data/reference/cpp/class_gosu_1_1_audio-members.html +0 -76
  109. data/reference/cpp/class_gosu_1_1_audio.html +0 -155
  110. data/reference/cpp/class_gosu_1_1_bitmap-members.html +0 -86
  111. data/reference/cpp/class_gosu_1_1_bitmap.html +0 -506
  112. data/reference/cpp/class_gosu_1_1_buffer-members.html +0 -85
  113. data/reference/cpp/class_gosu_1_1_buffer.html +0 -341
  114. data/reference/cpp/class_gosu_1_1_buffer.png +0 -0
  115. data/reference/cpp/class_gosu_1_1_button-members.html +0 -77
  116. data/reference/cpp/class_gosu_1_1_button.html +0 -198
  117. data/reference/cpp/class_gosu_1_1_color-members.html +0 -108
  118. data/reference/cpp/class_gosu_1_1_color.html +0 -972
  119. data/reference/cpp/class_gosu_1_1_comm_socket-members.html +0 -91
  120. data/reference/cpp/class_gosu_1_1_comm_socket.html +0 -506
  121. data/reference/cpp/class_gosu_1_1_file-members.html +0 -82
  122. data/reference/cpp/class_gosu_1_1_file.html +0 -276
  123. data/reference/cpp/class_gosu_1_1_file.png +0 -0
  124. data/reference/cpp/class_gosu_1_1_font-members.html +0 -82
  125. data/reference/cpp/class_gosu_1_1_font.html +0 -506
  126. data/reference/cpp/class_gosu_1_1_graphics-members.html +0 -93
  127. data/reference/cpp/class_gosu_1_1_graphics.html +0 -817
  128. data/reference/cpp/class_gosu_1_1_image-members.html +0 -87
  129. data/reference/cpp/class_gosu_1_1_image.html +0 -797
  130. data/reference/cpp/class_gosu_1_1_image_data-members.html +0 -78
  131. data/reference/cpp/class_gosu_1_1_image_data.html +0 -282
  132. data/reference/cpp/class_gosu_1_1_input-members.html +0 -86
  133. data/reference/cpp/class_gosu_1_1_input.html +0 -418
  134. data/reference/cpp/class_gosu_1_1_listener_socket-members.html +0 -79
  135. data/reference/cpp/class_gosu_1_1_listener_socket.html +0 -222
  136. data/reference/cpp/class_gosu_1_1_message_socket-members.html +0 -81
  137. data/reference/cpp/class_gosu_1_1_message_socket.html +0 -306
  138. data/reference/cpp/class_gosu_1_1_reader-members.html +0 -81
  139. data/reference/cpp/class_gosu_1_1_reader.html +0 -323
  140. data/reference/cpp/class_gosu_1_1_resource-members.html +0 -80
  141. data/reference/cpp/class_gosu_1_1_resource.html +0 -306
  142. data/reference/cpp/class_gosu_1_1_resource.png +0 -0
  143. data/reference/cpp/class_gosu_1_1_rot_flip-members.html +0 -84
  144. data/reference/cpp/class_gosu_1_1_rot_flip.html +0 -352
  145. data/reference/cpp/class_gosu_1_1_sample-members.html +0 -80
  146. data/reference/cpp/class_gosu_1_1_sample.html +0 -324
  147. data/reference/cpp/class_gosu_1_1_sample_instance-members.html +0 -82
  148. data/reference/cpp/class_gosu_1_1_sample_instance.html +0 -318
  149. data/reference/cpp/class_gosu_1_1_song-members.html +0 -90
  150. data/reference/cpp/class_gosu_1_1_song.html +0 -493
  151. data/reference/cpp/class_gosu_1_1_text_input-members.html +0 -80
  152. data/reference/cpp/class_gosu_1_1_text_input.html +0 -255
  153. data/reference/cpp/class_gosu_1_1_window-members.html +0 -91
  154. data/reference/cpp/class_gosu_1_1_window.html +0 -534
  155. data/reference/cpp/class_gosu_1_1_writer-members.html +0 -80
  156. data/reference/cpp/class_gosu_1_1_writer.html +0 -293
  157. data/reference/cpp/classes.html +0 -86
  158. data/reference/cpp/closed.gif +0 -0
  159. data/reference/cpp/cpp.css +0 -155
  160. data/reference/cpp/doxygen.png +0 -0
  161. data/reference/cpp/files.html +0 -99
  162. data/reference/cpp/functions.html +0 -128
  163. data/reference/cpp/functions_0x62.html +0 -144
  164. data/reference/cpp/functions_0x63.html +0 -143
  165. data/reference/cpp/functions_0x64.html +0 -143
  166. data/reference/cpp/functions_0x65.html +0 -122
  167. data/reference/cpp/functions_0x66.html +0 -144
  168. data/reference/cpp/functions_0x67.html +0 -136
  169. data/reference/cpp/functions_0x68.html +0 -122
  170. data/reference/cpp/functions_0x69.html +0 -124
  171. data/reference/cpp/functions_0x6b.html +0 -116
  172. data/reference/cpp/functions_0x6c.html +0 -118
  173. data/reference/cpp/functions_0x6d.html +0 -126
  174. data/reference/cpp/functions_0x6e.html +0 -121
  175. data/reference/cpp/functions_0x6f.html +0 -127
  176. data/reference/cpp/functions_0x70.html +0 -137
  177. data/reference/cpp/functions_0x72.html +0 -157
  178. data/reference/cpp/functions_0x73.html +0 -180
  179. data/reference/cpp/functions_0x74.html +0 -128
  180. data/reference/cpp/functions_0x75.html +0 -123
  181. data/reference/cpp/functions_0x76.html +0 -118
  182. data/reference/cpp/functions_0x77.html +0 -132
  183. data/reference/cpp/functions_0x78.html +0 -116
  184. data/reference/cpp/functions_0x79.html +0 -118
  185. data/reference/cpp/functions_0x7e.html +0 -142
  186. data/reference/cpp/functions_enum.html +0 -88
  187. data/reference/cpp/functions_eval.html +0 -90
  188. data/reference/cpp/functions_func.html +0 -124
  189. data/reference/cpp/functions_func_0x62.html +0 -136
  190. data/reference/cpp/functions_func_0x63.html +0 -137
  191. data/reference/cpp/functions_func_0x64.html +0 -141
  192. data/reference/cpp/functions_func_0x65.html +0 -120
  193. data/reference/cpp/functions_func_0x66.html +0 -140
  194. data/reference/cpp/functions_func_0x67.html +0 -130
  195. data/reference/cpp/functions_func_0x68.html +0 -120
  196. data/reference/cpp/functions_func_0x69.html +0 -120
  197. data/reference/cpp/functions_func_0x6b.html +0 -114
  198. data/reference/cpp/functions_func_0x6c.html +0 -114
  199. data/reference/cpp/functions_func_0x6d.html +0 -124
  200. data/reference/cpp/functions_func_0x6e.html +0 -117
  201. data/reference/cpp/functions_func_0x6f.html +0 -114
  202. data/reference/cpp/functions_func_0x70.html +0 -135
  203. data/reference/cpp/functions_func_0x72.html +0 -151
  204. data/reference/cpp/functions_func_0x73.html +0 -174
  205. data/reference/cpp/functions_func_0x74.html +0 -120
  206. data/reference/cpp/functions_func_0x75.html +0 -121
  207. data/reference/cpp/functions_func_0x76.html +0 -116
  208. data/reference/cpp/functions_func_0x77.html +0 -128
  209. data/reference/cpp/functions_func_0x7e.html +0 -140
  210. data/reference/cpp/functions_type.html +0 -88
  211. data/reference/cpp/functions_vars.html +0 -135
  212. data/reference/cpp/globals.html +0 -95
  213. data/reference/cpp/globals_defs.html +0 -95
  214. data/reference/cpp/hierarchy.html +0 -100
  215. data/reference/cpp/index.html +0 -67
  216. data/reference/cpp/namespace_gosu.html +0 -3311
  217. data/reference/cpp/namespace_gosu_1_1_colors.html +0 -287
  218. data/reference/cpp/namespace_gosu_1_1_win.html +0 -354
  219. data/reference/cpp/namespacemembers.html +0 -139
  220. data/reference/cpp/namespacemembers_0x62.html +0 -143
  221. data/reference/cpp/namespacemembers_0x63.html +0 -125
  222. data/reference/cpp/namespacemembers_0x64.html +0 -121
  223. data/reference/cpp/namespacemembers_0x66.html +0 -129
  224. data/reference/cpp/namespacemembers_0x67.html +0 -163
  225. data/reference/cpp/namespacemembers_0x68.html +0 -113
  226. data/reference/cpp/namespacemembers_0x69.html +0 -117
  227. data/reference/cpp/namespacemembers_0x6b.html +0 -289
  228. data/reference/cpp/namespacemembers_0x6c.html +0 -119
  229. data/reference/cpp/namespacemembers_0x6d.html +0 -131
  230. data/reference/cpp/namespacemembers_0x6e.html +0 -127
  231. data/reference/cpp/namespacemembers_0x6f.html +0 -121
  232. data/reference/cpp/namespacemembers_0x70.html +0 -115
  233. data/reference/cpp/namespacemembers_0x71.html +0 -113
  234. data/reference/cpp/namespacemembers_0x72.html +0 -165
  235. data/reference/cpp/namespacemembers_0x73.html +0 -135
  236. data/reference/cpp/namespacemembers_0x74.html +0 -129
  237. data/reference/cpp/namespacemembers_0x75.html +0 -117
  238. data/reference/cpp/namespacemembers_0x77.html +0 -117
  239. data/reference/cpp/namespacemembers_0x79.html +0 -113
  240. data/reference/cpp/namespacemembers_0x7a.html +0 -115
  241. data/reference/cpp/namespacemembers_enum.html +0 -103
  242. data/reference/cpp/namespacemembers_eval.html +0 -445
  243. data/reference/cpp/namespacemembers_func.html +0 -269
  244. data/reference/cpp/namespacemembers_type.html +0 -93
  245. data/reference/cpp/namespacemembers_vars.html +0 -117
  246. data/reference/cpp/namespaces.html +0 -76
  247. data/reference/cpp/open.gif +0 -0
  248. data/reference/cpp/struct_gosu_1_1_g_l_tex_info-members.html +0 -78
  249. data/reference/cpp/struct_gosu_1_1_g_l_tex_info.html +0 -186
  250. data/reference/cpp/struct_gosu_1_1_touch-members.html +0 -76
  251. data/reference/cpp/struct_gosu_1_1_touch.html +0 -154
  252. data/reference/cpp/tab_b.gif +0 -0
  253. data/reference/cpp/tab_l.gif +0 -0
  254. data/reference/cpp/tab_r.gif +0 -0
  255. data/reference/cpp/tabs.css +0 -105
  256. data/reference/rdoc/classes/Gosu.html +0 -1546
  257. data/reference/rdoc/classes/Gosu/Color.html +0 -660
  258. data/reference/rdoc/classes/Gosu/Font.html +0 -545
  259. data/reference/rdoc/classes/Gosu/GLTexInfo.html +0 -412
  260. data/reference/rdoc/classes/Gosu/Image.html +0 -706
  261. data/reference/rdoc/classes/Gosu/Sample.html +0 -476
  262. data/reference/rdoc/classes/Gosu/SampleInstance.html +0 -523
  263. data/reference/rdoc/classes/Gosu/Song.html +0 -568
  264. data/reference/rdoc/classes/Gosu/TextInput.html +0 -444
  265. data/reference/rdoc/classes/Gosu/Window.html +0 -911
  266. data/reference/rdoc/classes/Numeric.html +0 -479
  267. data/reference/rdoc/created.rid +0 -1
  268. data/reference/rdoc/files/COPYING_txt.html +0 -391
  269. data/reference/rdoc/files/README_txt.html +0 -387
  270. data/reference/rdoc/files/reference/Deployment on OS X_rdoc.html +0 -381
  271. data/reference/rdoc/files/reference/Deployment on Windows_rdoc.html +0 -385
  272. data/reference/rdoc/files/reference/Drawing with Colors_rdoc.html +0 -363
  273. data/reference/rdoc/files/reference/Order of Corners_rdoc.html +0 -358
  274. data/reference/rdoc/files/reference/Tileability_rdoc.html +0 -374
  275. data/reference/rdoc/files/reference/Z Ordering_rdoc.html +0 -361
  276. data/reference/rdoc/files/reference/gosu_rb.html +0 -348
  277. data/reference/rdoc/fr_class_index.html +0 -12
  278. data/reference/rdoc/fr_file_index.html +0 -10
  279. data/reference/rdoc/fr_method_index.html +0 -66
  280. data/reference/rdoc/index.html +0 -1
  281. data/reference/rdoc/rdoc-style.css +0 -320
@@ -1,412 +0,0 @@
1
- <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Class: Gosu::GLTexInfo</title><link type="text/css" href="../.././rdoc-style.css" rel="stylesheet" media="screen"/><script type="text/javascript">
2
- // Allison template
3
- // Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
4
-
5
- var href_base = '../.././rdoc-style.css'.replace(/(.*\/).*/, '$1'); // inline js is good for something
6
-
7
- function $(id) {
8
- if (document.getElementById)
9
- elem = document.getElementById(id);
10
- else if ( document.all )
11
- elem = eval("document.all." + id);
12
- else
13
- return false;
14
- return elem;
15
- }
16
-
17
- function toggle(id) {
18
- elem = $(id);
19
- elemStyle = elem.style;
20
- if (elemStyle.display == "block") {
21
- elemStyle.display = "none"
22
- } else {
23
- elemStyle.display = "block"
24
- }
25
- return true;
26
- }
27
-
28
- function toggleText(id) {
29
- elem = $(id)
30
- if (m = elem.innerHTML.match(/(Hide)(.*)/)) {
31
- elem.innerHTML = "Show" + m[2];
32
- } else if (m = elem.innerHTML.match(/(Show)(.*)/)) {
33
- elem.innerHTML = "Hide" + m[2];
34
- }
35
- return true;
36
- }
37
-
38
- function span(s, klass) {
39
- return '<span class="' + klass + '">' + s + '</span>';
40
- }
41
-
42
- function highlightSymbols() {
43
- pres = document.getElementsByTagName('pre');
44
- for(var i = 0; i < pres.length; i++) {
45
- pre = pres[i];
46
- spans = pre.getElementsByTagName('span');
47
- for(var k = 0; k < spans.length; k++) {
48
- span = spans[k];
49
- if (span.className.match(/ruby-identifier/)) {
50
- if (span.innerHTML.match(/^:/)) {
51
- span.className += " ruby-symbol";
52
- }
53
- }
54
- }
55
- }
56
- }
57
-
58
- function hasClass(obj) {
59
- var result = false;
60
- if (obj.getAttributeNode("class") != null) {
61
- result = obj.getAttributeNode("class").value;
62
- }
63
- return result;
64
- }
65
-
66
- function stripe() {
67
- var even = true;
68
- var color = "#e4ebed";
69
- var tables = document.getElementsByTagName('table');
70
- if (tables.length == 0) { return; }
71
- for (var h = 0; h < tables.length; h++) {
72
- var trs = tables[h].getElementsByTagName("tr");
73
- for (var i = 0; i < trs.length; i++) {
74
- var tds = trs[i].getElementsByTagName("td");
75
- for (var j = 0; j < tds.length; j++) {
76
- if (hasClass(tds[j]) != "first") {
77
- var mytd = tds[j];
78
- if (even) {
79
- mytd.style.backgroundColor = color;
80
- }
81
- }
82
- }
83
- even = ! even;
84
- }
85
- }
86
- }
87
-
88
- function ajaxGet(url) {
89
- url = (href_base + url).replace('/./', '/')
90
- var req = false;
91
-
92
- if (window.ActiveXObject) {
93
- try {
94
- // stupid hack because IE7 disables local Ajax with the native xmlhttprequest object
95
- // for security purposes. Yet ActiveX still works. Thanks, Microsoft. I hate you. Die.
96
- req = new ActiveXObject("MSXML2.XMLHTTP.3.0");
97
- } catch (e) {
98
- try {
99
- /* IE 6 and maybe 5, don't know, don't care */
100
- req = new ActiveXObject("Msxml2.XMLHTTP");
101
- } catch (e) {
102
- try {
103
- req = new ActiveXObject("Microsoft.XMLHTTP");
104
- } catch (e) {
105
- req = false;
106
- }
107
- }
108
- }
109
- }
110
-
111
- /* real browsers */
112
- if (!req && window.XMLHttpRequest) {
113
- try {
114
- req = new XMLHttpRequest();
115
- } catch (e) {
116
- req = false;
117
- }
118
- }
119
-
120
- if (req) {
121
- req.open('GET', url, false);
122
- req.send(null);
123
- return req.responseText;
124
- } else {
125
- return "Ajax error";
126
- }
127
- }
128
-
129
-
130
- function addEvent(elm, evType, fn, useCapture) {
131
- if (elm.addEventListener) {
132
- elm.addEventListener(evType, fn, useCapture);
133
- return true;
134
- } else if (elm.attachEvent) {
135
- var r = elm.attachEvent('on' + evType, fn);
136
- return r;
137
- } else {
138
- elm['on' + evType] = fn;
139
- }
140
- }
141
-
142
- function insertIndices() {
143
- pages = ["class", "file", "method"]
144
- for (x in pages) {
145
- $(pages[x]).innerHTML += ajaxGet('fr_' + pages[x] + '_index.html').replace(/(href=")/g, '$1' + href_base);
146
- }
147
- /* mouseoverify method links */
148
- links = $('method').getElementsByTagName('a');
149
- for (var x = 0; x < links.length; x++) {
150
- if (m = links[x].innerHTML.match(/(.*)\s\((.*)\)/)) {
151
- links[x].innerHTML = m[1] + '<br>';
152
- links[x].title = m[2];
153
- }
154
- }
155
- /* this is stupid */
156
- $('class').style.display = "block";
157
- $('file').style.display = "block";
158
-
159
- /* has to be here because IE7 does not guarantee the onLoad callback order */
160
- abbreviateIndicesInner(["class", "file"], 25, "a");
161
- /* same, linkTitle() depends on the class link list */
162
- linkTitle();
163
- }
164
-
165
- function abbreviateIndices() {
166
- var ids = ["defined_in", "child_of", "includes", "requires", "method", "methods"];
167
- abbreviateIndicesInner(ids, 25, 'a');
168
- abbreviateIndicesInner(ids, 25, 'span');
169
- }
170
-
171
- function abbreviateIndicesInner(indices, amount, tag) {
172
- for (var x = 0; x < indices.length; x++) {
173
- var the_index = $(indices[x]);
174
- if (the_index) {
175
- links = the_index.getElementsByTagName(tag);
176
- for (var y = 0; y < links.length; y++) {
177
- var link = links[y];
178
- if (link.getElementsByTagName('span').length == 0 && link.getElementsByTagName('a').length == 0) {
179
- // avoid nesting
180
- link.innerHTML = link.innerHTML.replace(/<br>|\n/gi, '');
181
- link.title = link.innerHTML;
182
- link.innerHTML = abbreviate(link.innerHTML, amount) + '<br>';
183
- }
184
- }
185
- }
186
- }
187
- }
188
-
189
- function linkTitle() {
190
-
191
- /* grab the correct title element from the index */
192
- var index_page = ajaxGet('index.html');
193
- title_text = index_page.match(/<title>(.*)<\/title>/m)[1];
194
- document.title = title_text + " - " + document.title;
195
- var p = $('header').getElementsByTagName('p')[0]
196
- if (p.innerHTML.match(/^\s*$/)) {
197
- p.innerHTML = title_text;
198
- } else {
199
- p.innerHTML = title_text + ": " + p.innerHTML;
200
- }
201
-
202
- /* set the link properly */
203
- title_link = index_page.match(/<a\s+href="(.*?)"/)[1];
204
- var element = $('title');
205
- var item_type = "";
206
- var item_name = "";
207
- if (m = element.innerHTML.match(/(Class:|Module:|File:)\s*(.*)/)) {
208
- item_type = m[1];
209
- item_name = m[2];
210
- } else {
211
- item_name = element.innerHTML;
212
- }
213
- element.innerHTML = '<a href="' + href_base + title_link + '">' + item_type + " " + abbreviate(item_name, 45) + '</a>';
214
- element.getElementsByTagName('a')[0].title = item_name
215
-
216
- /* breadcrumb navigation */
217
- items = item_name.split("::");
218
- items_new = item_name.split("::");
219
- file_links = $('class').getElementsByTagName('a');
220
- for (var x = 0; x < items.length - 1; x++ ){
221
- var item = items[x];
222
- link = ("/classes/" + items.slice(0,x).join("/") + "/" + item + ".html").replace('//', '/');
223
- regex = new RegExp(RegExp.escape(link) + '$');
224
- for (var y = 0; y < file_links.length; y++) {
225
- if (file_links[y].href.match(regex)) {
226
- items_new[x] = '<a href="' + href_base + link + '">' + item + '</a>';
227
- break;
228
- }
229
- }
230
- }
231
- $('item_name').innerHTML = item_type + ' ' + items_new.join(" :: ");
232
- }
233
-
234
- function abbreviate(s, size) {
235
- // Try to get rid of path and extension in any case. These are not
236
- // even interesting if there is enough space.
237
-
238
- s = s.replace(/\..*$/, '');
239
- s = s.replace(/.*\//g, '');
240
-
241
- // Now this is a blatant hack.
242
-
243
- if (s == 'gosu')
244
- return ''; // Noone will ever see the link, harhar!
245
-
246
- while (s.length > size) {
247
- var old_s = s;
248
- s = s.replace(/\s|\n/mg, '');
249
- s = s.replace(/([A-Z])[a-z]+/m, '$1');
250
- if (!s || old_s == s) {
251
- return "..." + s.substring(s.length - size, s.length);
252
- }
253
- }
254
- return s;
255
- }
256
-
257
- function disableSubmit(event) {
258
- var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
259
- if (keyCode == 13) {
260
- return false;
261
- } else {
262
- return true;
263
- }
264
- }
265
-
266
- function filterList(id, s, event) {
267
-
268
- /* some weak escaping */
269
- s = s.replace(/[^\w\d\.\_\-\/\:\=\[\]\?\!]/g, '');
270
- s = RegExp.escape(s);
271
-
272
- var show_all = false;
273
- if (s.match(/^\s*$/)) {
274
- show_all = true;
275
- }
276
-
277
- links = $(id).getElementsByTagName('a')
278
- regex = new RegExp(s, 'i');
279
-
280
- for (var x = 0; x < links.length; x++) {
281
- var link = links[x];
282
- if (show_all) {
283
- link.style.display = 'inline';
284
- } else {
285
- if (link.innerHTML.match(regex)) {
286
- link.style.display = 'inline';
287
- } else {
288
- link.style.display = 'none';
289
- }
290
- }
291
- }
292
- return true;
293
- }
294
-
295
- RegExp.escape = function(text) {
296
- if (!arguments.callee.sRE) {
297
- var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
298
- arguments.callee.sRE = new RegExp(
299
- '(\\' + specials.join('|\\') + ')', 'g'
300
- );
301
- }
302
- return text.replace(arguments.callee.sRE, '\\$1');
303
- }
304
-
305
- function hacks() {
306
- // show the spacer if necessary,
307
- divs = document.getElementsByTagName('div');
308
- for(var x = 0; x < divs.length; x++) {
309
- if (divs[x].className && divs[x].className.match(/top/)) {
310
- document.getElementById('spacer').style.display = 'block';
311
- }
312
- }
313
- // remove extra colons from tables
314
- tds = document.getElementsByTagName('td');
315
- for(var x = 0; x < tds.length; x++) {
316
- str = tds[x].innerHTML
317
- if (str.charAt(str.length - 1) == ":") {
318
- tds[x].innerHTML = str.slice(0, str.length - 1)
319
- }
320
- }
321
- }
322
-
323
- addEvent(window, 'load', insertIndices, false);
324
- addEvent(window, 'load', abbreviateIndices, false);
325
- addEvent(window, 'load', stripe, false);
326
- addEvent(window, 'load', highlightSymbols, false);
327
- addEvent(window, 'load', hacks, false);
328
- </script></head><body><div id="container"><div class="curve" id="preheader_curve_0"></div><div class="curve" id="preheader_curve_1"></div><div class="curve" id="preheader_curve_2"></div><div class="curve" id="preheader_curve_3"></div><div class="curve" id="preheader_curve_4"></div><div class="curve" id="preheader_curve_5"></div><div id="header"><span><h1 id="title">
329
- Class: Gosu::GLTexInfo
330
- </h1></span></div><div class="clear"></div><div id="left">
331
- <div class="navigation darker top" id="child_of"><h3>Child of</h3><span>
332
-
333
- Object
334
- </span></div>
335
-
336
- <div class="navigation darker top" id="defined_in"><h3>Defined in</h3>
337
-
338
- <a href="../../files/reference/gosu_rb.html">reference/gosu.rb</a>
339
-
340
- </div>
341
-
342
-
343
-
344
- <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('class', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_class"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('file', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_file"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('method', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_method"></input></form></div></div></div><div id="content">
345
- <div id="description"><p>
346
- Contains information about the underlying OpenGL texture and the u/v space
347
- used for image data.
348
- </p>
349
- <p>
350
- Can be retrieved from some images to use them in OpenGL operations. nil
351
- will be returned instead by images that are too large for a single
352
- texture.)
353
- </p>
354
- <p>
355
- See examples/OpenGLIntegration.rb.
356
- </p>
357
- </div>
358
-
359
-
360
-
361
-
362
- <p></p>
363
-
364
-
365
-
366
-
367
- <h1>Attributes</h1><p><table><tr><th>Name</th><th>Read/write?</th></tr>
368
- <tr>
369
- <td class="highlight">bottom</td>
370
-
371
-
372
-
373
-
374
- <td class="normal">R</td>
375
- </tr>
376
- <tr>
377
- <td class="highlight">left</td>
378
-
379
-
380
-
381
-
382
- <td class="normal">R</td>
383
- </tr>
384
- <tr>
385
- <td class="highlight">right</td>
386
-
387
-
388
-
389
-
390
- <td class="normal">R</td>
391
- </tr>
392
- <tr>
393
- <td class="highlight">tex_name</td>
394
-
395
-
396
-
397
-
398
- <td class="normal">R</td>
399
- </tr>
400
- <tr>
401
- <td class="highlight">top</td>
402
-
403
-
404
-
405
-
406
- <td class="normal">R</td>
407
- </tr>
408
- </table></p>
409
-
410
-
411
-
412
- </div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>
@@ -1,706 +0,0 @@
1
- <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Class: Gosu::Image</title><link type="text/css" href="../.././rdoc-style.css" rel="stylesheet" media="screen"/><script type="text/javascript">
2
- // Allison template
3
- // Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
4
-
5
- var href_base = '../.././rdoc-style.css'.replace(/(.*\/).*/, '$1'); // inline js is good for something
6
-
7
- function $(id) {
8
- if (document.getElementById)
9
- elem = document.getElementById(id);
10
- else if ( document.all )
11
- elem = eval("document.all." + id);
12
- else
13
- return false;
14
- return elem;
15
- }
16
-
17
- function toggle(id) {
18
- elem = $(id);
19
- elemStyle = elem.style;
20
- if (elemStyle.display == "block") {
21
- elemStyle.display = "none"
22
- } else {
23
- elemStyle.display = "block"
24
- }
25
- return true;
26
- }
27
-
28
- function toggleText(id) {
29
- elem = $(id)
30
- if (m = elem.innerHTML.match(/(Hide)(.*)/)) {
31
- elem.innerHTML = "Show" + m[2];
32
- } else if (m = elem.innerHTML.match(/(Show)(.*)/)) {
33
- elem.innerHTML = "Hide" + m[2];
34
- }
35
- return true;
36
- }
37
-
38
- function span(s, klass) {
39
- return '<span class="' + klass + '">' + s + '</span>';
40
- }
41
-
42
- function highlightSymbols() {
43
- pres = document.getElementsByTagName('pre');
44
- for(var i = 0; i < pres.length; i++) {
45
- pre = pres[i];
46
- spans = pre.getElementsByTagName('span');
47
- for(var k = 0; k < spans.length; k++) {
48
- span = spans[k];
49
- if (span.className.match(/ruby-identifier/)) {
50
- if (span.innerHTML.match(/^:/)) {
51
- span.className += " ruby-symbol";
52
- }
53
- }
54
- }
55
- }
56
- }
57
-
58
- function hasClass(obj) {
59
- var result = false;
60
- if (obj.getAttributeNode("class") != null) {
61
- result = obj.getAttributeNode("class").value;
62
- }
63
- return result;
64
- }
65
-
66
- function stripe() {
67
- var even = true;
68
- var color = "#e4ebed";
69
- var tables = document.getElementsByTagName('table');
70
- if (tables.length == 0) { return; }
71
- for (var h = 0; h < tables.length; h++) {
72
- var trs = tables[h].getElementsByTagName("tr");
73
- for (var i = 0; i < trs.length; i++) {
74
- var tds = trs[i].getElementsByTagName("td");
75
- for (var j = 0; j < tds.length; j++) {
76
- if (hasClass(tds[j]) != "first") {
77
- var mytd = tds[j];
78
- if (even) {
79
- mytd.style.backgroundColor = color;
80
- }
81
- }
82
- }
83
- even = ! even;
84
- }
85
- }
86
- }
87
-
88
- function ajaxGet(url) {
89
- url = (href_base + url).replace('/./', '/')
90
- var req = false;
91
-
92
- if (window.ActiveXObject) {
93
- try {
94
- // stupid hack because IE7 disables local Ajax with the native xmlhttprequest object
95
- // for security purposes. Yet ActiveX still works. Thanks, Microsoft. I hate you. Die.
96
- req = new ActiveXObject("MSXML2.XMLHTTP.3.0");
97
- } catch (e) {
98
- try {
99
- /* IE 6 and maybe 5, don't know, don't care */
100
- req = new ActiveXObject("Msxml2.XMLHTTP");
101
- } catch (e) {
102
- try {
103
- req = new ActiveXObject("Microsoft.XMLHTTP");
104
- } catch (e) {
105
- req = false;
106
- }
107
- }
108
- }
109
- }
110
-
111
- /* real browsers */
112
- if (!req && window.XMLHttpRequest) {
113
- try {
114
- req = new XMLHttpRequest();
115
- } catch (e) {
116
- req = false;
117
- }
118
- }
119
-
120
- if (req) {
121
- req.open('GET', url, false);
122
- req.send(null);
123
- return req.responseText;
124
- } else {
125
- return "Ajax error";
126
- }
127
- }
128
-
129
-
130
- function addEvent(elm, evType, fn, useCapture) {
131
- if (elm.addEventListener) {
132
- elm.addEventListener(evType, fn, useCapture);
133
- return true;
134
- } else if (elm.attachEvent) {
135
- var r = elm.attachEvent('on' + evType, fn);
136
- return r;
137
- } else {
138
- elm['on' + evType] = fn;
139
- }
140
- }
141
-
142
- function insertIndices() {
143
- pages = ["class", "file", "method"]
144
- for (x in pages) {
145
- $(pages[x]).innerHTML += ajaxGet('fr_' + pages[x] + '_index.html').replace(/(href=")/g, '$1' + href_base);
146
- }
147
- /* mouseoverify method links */
148
- links = $('method').getElementsByTagName('a');
149
- for (var x = 0; x < links.length; x++) {
150
- if (m = links[x].innerHTML.match(/(.*)\s\((.*)\)/)) {
151
- links[x].innerHTML = m[1] + '<br>';
152
- links[x].title = m[2];
153
- }
154
- }
155
- /* this is stupid */
156
- $('class').style.display = "block";
157
- $('file').style.display = "block";
158
-
159
- /* has to be here because IE7 does not guarantee the onLoad callback order */
160
- abbreviateIndicesInner(["class", "file"], 25, "a");
161
- /* same, linkTitle() depends on the class link list */
162
- linkTitle();
163
- }
164
-
165
- function abbreviateIndices() {
166
- var ids = ["defined_in", "child_of", "includes", "requires", "method", "methods"];
167
- abbreviateIndicesInner(ids, 25, 'a');
168
- abbreviateIndicesInner(ids, 25, 'span');
169
- }
170
-
171
- function abbreviateIndicesInner(indices, amount, tag) {
172
- for (var x = 0; x < indices.length; x++) {
173
- var the_index = $(indices[x]);
174
- if (the_index) {
175
- links = the_index.getElementsByTagName(tag);
176
- for (var y = 0; y < links.length; y++) {
177
- var link = links[y];
178
- if (link.getElementsByTagName('span').length == 0 && link.getElementsByTagName('a').length == 0) {
179
- // avoid nesting
180
- link.innerHTML = link.innerHTML.replace(/<br>|\n/gi, '');
181
- link.title = link.innerHTML;
182
- link.innerHTML = abbreviate(link.innerHTML, amount) + '<br>';
183
- }
184
- }
185
- }
186
- }
187
- }
188
-
189
- function linkTitle() {
190
-
191
- /* grab the correct title element from the index */
192
- var index_page = ajaxGet('index.html');
193
- title_text = index_page.match(/<title>(.*)<\/title>/m)[1];
194
- document.title = title_text + " - " + document.title;
195
- var p = $('header').getElementsByTagName('p')[0]
196
- if (p.innerHTML.match(/^\s*$/)) {
197
- p.innerHTML = title_text;
198
- } else {
199
- p.innerHTML = title_text + ": " + p.innerHTML;
200
- }
201
-
202
- /* set the link properly */
203
- title_link = index_page.match(/<a\s+href="(.*?)"/)[1];
204
- var element = $('title');
205
- var item_type = "";
206
- var item_name = "";
207
- if (m = element.innerHTML.match(/(Class:|Module:|File:)\s*(.*)/)) {
208
- item_type = m[1];
209
- item_name = m[2];
210
- } else {
211
- item_name = element.innerHTML;
212
- }
213
- element.innerHTML = '<a href="' + href_base + title_link + '">' + item_type + " " + abbreviate(item_name, 45) + '</a>';
214
- element.getElementsByTagName('a')[0].title = item_name
215
-
216
- /* breadcrumb navigation */
217
- items = item_name.split("::");
218
- items_new = item_name.split("::");
219
- file_links = $('class').getElementsByTagName('a');
220
- for (var x = 0; x < items.length - 1; x++ ){
221
- var item = items[x];
222
- link = ("/classes/" + items.slice(0,x).join("/") + "/" + item + ".html").replace('//', '/');
223
- regex = new RegExp(RegExp.escape(link) + '$');
224
- for (var y = 0; y < file_links.length; y++) {
225
- if (file_links[y].href.match(regex)) {
226
- items_new[x] = '<a href="' + href_base + link + '">' + item + '</a>';
227
- break;
228
- }
229
- }
230
- }
231
- $('item_name').innerHTML = item_type + ' ' + items_new.join(" :: ");
232
- }
233
-
234
- function abbreviate(s, size) {
235
- // Try to get rid of path and extension in any case. These are not
236
- // even interesting if there is enough space.
237
-
238
- s = s.replace(/\..*$/, '');
239
- s = s.replace(/.*\//g, '');
240
-
241
- // Now this is a blatant hack.
242
-
243
- if (s == 'gosu')
244
- return ''; // Noone will ever see the link, harhar!
245
-
246
- while (s.length > size) {
247
- var old_s = s;
248
- s = s.replace(/\s|\n/mg, '');
249
- s = s.replace(/([A-Z])[a-z]+/m, '$1');
250
- if (!s || old_s == s) {
251
- return "..." + s.substring(s.length - size, s.length);
252
- }
253
- }
254
- return s;
255
- }
256
-
257
- function disableSubmit(event) {
258
- var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
259
- if (keyCode == 13) {
260
- return false;
261
- } else {
262
- return true;
263
- }
264
- }
265
-
266
- function filterList(id, s, event) {
267
-
268
- /* some weak escaping */
269
- s = s.replace(/[^\w\d\.\_\-\/\:\=\[\]\?\!]/g, '');
270
- s = RegExp.escape(s);
271
-
272
- var show_all = false;
273
- if (s.match(/^\s*$/)) {
274
- show_all = true;
275
- }
276
-
277
- links = $(id).getElementsByTagName('a')
278
- regex = new RegExp(s, 'i');
279
-
280
- for (var x = 0; x < links.length; x++) {
281
- var link = links[x];
282
- if (show_all) {
283
- link.style.display = 'inline';
284
- } else {
285
- if (link.innerHTML.match(regex)) {
286
- link.style.display = 'inline';
287
- } else {
288
- link.style.display = 'none';
289
- }
290
- }
291
- }
292
- return true;
293
- }
294
-
295
- RegExp.escape = function(text) {
296
- if (!arguments.callee.sRE) {
297
- var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
298
- arguments.callee.sRE = new RegExp(
299
- '(\\' + specials.join('|\\') + ')', 'g'
300
- );
301
- }
302
- return text.replace(arguments.callee.sRE, '\\$1');
303
- }
304
-
305
- function hacks() {
306
- // show the spacer if necessary,
307
- divs = document.getElementsByTagName('div');
308
- for(var x = 0; x < divs.length; x++) {
309
- if (divs[x].className && divs[x].className.match(/top/)) {
310
- document.getElementById('spacer').style.display = 'block';
311
- }
312
- }
313
- // remove extra colons from tables
314
- tds = document.getElementsByTagName('td');
315
- for(var x = 0; x < tds.length; x++) {
316
- str = tds[x].innerHTML
317
- if (str.charAt(str.length - 1) == ":") {
318
- tds[x].innerHTML = str.slice(0, str.length - 1)
319
- }
320
- }
321
- }
322
-
323
- addEvent(window, 'load', insertIndices, false);
324
- addEvent(window, 'load', abbreviateIndices, false);
325
- addEvent(window, 'load', stripe, false);
326
- addEvent(window, 'load', highlightSymbols, false);
327
- addEvent(window, 'load', hacks, false);
328
- </script></head><body><div id="container"><div class="curve" id="preheader_curve_0"></div><div class="curve" id="preheader_curve_1"></div><div class="curve" id="preheader_curve_2"></div><div class="curve" id="preheader_curve_3"></div><div class="curve" id="preheader_curve_4"></div><div class="curve" id="preheader_curve_5"></div><div id="header"><span><h1 id="title">
329
- Class: Gosu::Image
330
- </h1></span></div><div class="clear"></div><div id="left">
331
- <div class="navigation darker top" id="child_of"><h3>Child of</h3><span>
332
-
333
- Object
334
- </span></div>
335
-
336
- <div class="navigation darker top" id="defined_in"><h3>Defined in</h3>
337
-
338
- <a href="../../files/reference/gosu_rb.html">reference/gosu.rb</a>
339
-
340
- </div>
341
-
342
-
343
-
344
- <div class="navigation top" id="methods"><h3>Methods</h3>
345
-
346
-
347
- <a href='#M000053'>
348
- draw<br/>
349
- </a>
350
-
351
-
352
-
353
-
354
- <a href='#M000055'>
355
- draw_as_quad<br/>
356
- </a>
357
-
358
-
359
-
360
-
361
- <a href='#M000054'>
362
- draw_rot<br/>
363
- </a>
364
-
365
-
366
-
367
-
368
- <a href='#M000057'>
369
- from_text<br/>
370
- </a>
371
-
372
-
373
-
374
-
375
- <a href='#M000056'>
376
- from_text<br/>
377
- </a>
378
-
379
-
380
-
381
-
382
- <a href='#M000059'>
383
- gl_tex_info<br/>
384
- </a>
385
-
386
-
387
-
388
-
389
- <a href='#M000058'>
390
- load_tiles<br/>
391
- </a>
392
-
393
-
394
-
395
-
396
- <a href='#M000052'>
397
- new<br/>
398
- </a>
399
-
400
-
401
-
402
-
403
- <a href='#M000051'>
404
- new<br/>
405
- </a>
406
-
407
-
408
- </div>
409
- <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('class', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_class"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('file', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_file"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('method', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_method"></input></form></div></div></div><div id="content">
410
- <div id="description"><p>
411
- Provides functionality for drawing rectangular images.
412
- </p>
413
- </div>
414
-
415
-
416
-
417
-
418
- <p></p>
419
-
420
-
421
-
422
-
423
- <h1>Attributes</h1><p><table><tr><th>Name</th><th>Read/write?</th></tr>
424
- <tr>
425
- <td class="highlight">height</td>
426
-
427
-
428
-
429
-
430
- <td class="normal">R</td>
431
- </tr>
432
- <tr>
433
- <td class="highlight">width</td>
434
-
435
-
436
-
437
-
438
- <td class="normal">R</td>
439
- </tr>
440
- </table></p>
441
-
442
-
443
- <h1>Public Class Methods</h1>
444
-
445
-
446
- <a class="small" name="M000057"><br/></a>
447
- <div class="method_block"><h3>
448
- <a href='#M000057'>
449
-
450
-
451
- from_text
452
-
453
- (window, text, font_name, font_height, line_spacing, max_width, align)
454
-
455
- </a>
456
- </h3>
457
- <p>
458
- Creates an <a href="Image.html">Image</a> that is filled with the text
459
- given to the function.
460
- </p>
461
- <p>
462
- The text may contain line breaks.
463
- </p>
464
- <p>
465
- The text is always rendered in white. If you want to <a
466
- href="Image.html#M000053">draw</a> it in a different color, just modulate
467
- it by the target color.
468
- </p>
469
- <table>
470
- <tr><td valign="top">font_name:</td><td>Name of a system font, or a filename to a TTF file (must contain
471
- &#8217;/&#8217;, does not work on Linux).
472
-
473
- </td></tr>
474
- <tr><td valign="top">font_height:</td><td>Height of the font in pixels.
475
-
476
- </td></tr>
477
- <tr><td valign="top">line_spacing:</td><td>Spacing between two lines of text in pixels.
478
-
479
- </td></tr>
480
- <tr><td valign="top">max_width:</td><td>Width of the bitmap that will be returned. Text will be split into multiple
481
- lines to avoid drawing over the right border. When a single word is too
482
- long, it will be truncated.
483
-
484
- </td></tr>
485
- <tr><td valign="top">align:</td><td>One of :left, :right, :center or :justify.
486
-
487
- </td></tr>
488
- </table>
489
-
490
- <p class="source_link" id="M000057-show-link"><a href="#" onclick="toggle('M000057-source'); toggleText('M000057-link'); return false;" id="M000057-link">Show source...</a></p><div class="source" id="M000057-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 243</span>
491
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_text</span>(<span class="ruby-identifier">window</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font_height</span>, <span class="ruby-identifier">line_spacing</span>, <span class="ruby-identifier">max_width</span>, <span class="ruby-identifier">align</span>); <span class="ruby-keyword kw">end</span></pre></div>
492
- </div>
493
-
494
- <a class="small" name="M000056"><br/></a>
495
- <div class="method_block"><h3>
496
- <a href='#M000056'>
497
-
498
-
499
- from_text
500
-
501
- (window, text, font_name, font_height)
502
-
503
- </a>
504
- </h3>
505
- <p>
506
- Creates an <a href="Image.html">Image</a> containing a line of text.
507
- </p>
508
- <p>
509
- The text is always rendered in white. If you want to <a
510
- href="Image.html#M000053">draw</a> it in a different color, just modulate
511
- it by the target color.
512
- </p>
513
- <table>
514
- <tr><td valign="top">font_name:</td><td>Name of a system font, or a filename to a TTF file (must contain
515
- &#8217;/&#8217;, does not work on Linux).
516
-
517
- </td></tr>
518
- <tr><td valign="top">font_height:</td><td>Height of the font in pixels.
519
-
520
- </td></tr>
521
- </table>
522
-
523
- <p class="source_link" id="M000056-show-link"><a href="#" onclick="toggle('M000056-source'); toggleText('M000056-link'); return false;" id="M000056-link">Show source...</a></p><div class="source" id="M000056-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 230</span>
524
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_text</span>(<span class="ruby-identifier">window</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font_height</span>); <span class="ruby-keyword kw">end</span></pre></div>
525
- </div>
526
-
527
- <a class="small" name="M000058"><br/></a>
528
- <div class="method_block"><h3>
529
- <a href='#M000058'>
530
-
531
-
532
- load_tiles
533
-
534
- (window, filename_or_rmagick_image, tile_width, tile_height, tileable)
535
-
536
- </a>
537
- </h3>
538
- <p>
539
- Convenience function that splits a BMP or PNG file into an array of small
540
- rectangles and creates images from them. Returns the Array containing <a
541
- href="Image.html">Image</a> instances.
542
- </p>
543
- <table>
544
- <tr><td valign="top">tile_width:</td><td>If positive, specifies the width of one tile in pixels. If negative, the
545
- bitmap is divided into -tile_width rows.
546
-
547
- </td></tr>
548
- <tr><td valign="top">tile_height:</td><td>See tile_width.
549
-
550
- </td></tr>
551
- </table>
552
-
553
- <p class="source_link" id="M000058-show-link"><a href="#" onclick="toggle('M000058-source'); toggleText('M000058-link'); return false;" id="M000058-link">Show source...</a></p><div class="source" id="M000058-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 250</span>
554
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_tiles</span>(<span class="ruby-identifier">window</span>, <span class="ruby-identifier">filename_or_rmagick_image</span>, <span class="ruby-identifier">tile_width</span>, <span class="ruby-identifier">tile_height</span>, <span class="ruby-identifier">tileable</span>); <span class="ruby-keyword kw">end</span></pre></div>
555
- </div>
556
-
557
- <a class="small" name="M000052"><br/></a>
558
- <div class="method_block"><h3>
559
- <a href='#M000052'>
560
-
561
-
562
- new
563
-
564
- (window, filename_or_rmagick_image, tileable, src_x, src_y, src_width, src_height)
565
-
566
- </a>
567
- </h3>
568
- <p>
569
- Loads an image from a given filename that can be drawn onto the given
570
- window.
571
- </p>
572
- <p>
573
- This constructor can handle PNG and BMP images. A color key of ff00ff is
574
- automatically applied to BMP type images. For more flexibility, use PNG
575
- files.
576
- </p>
577
- <p>
578
- This constructor only loads a sub-rectangle of the given file. Because
579
- every call of this constructor will open the image again, it is preferable
580
- to use <a href="Image.html#M000058">Image#load_tiles</a>.
581
- </p>
582
-
583
- <p class="source_link" id="M000052-show-link"><a href="#" onclick="toggle('M000052-source'); toggleText('M000052-link'); return false;" id="M000052-link">Show source...</a></p><div class="source" id="M000052-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 211</span>
584
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">window</span>, <span class="ruby-identifier">filename_or_rmagick_image</span>, <span class="ruby-identifier">tileable</span>, <span class="ruby-identifier">src_x</span>, <span class="ruby-identifier">src_y</span>, <span class="ruby-identifier">src_width</span>, <span class="ruby-identifier">src_height</span>); <span class="ruby-keyword kw">end</span></pre></div>
585
- </div>
586
-
587
- <a class="small" name="M000051"><br/></a>
588
- <div class="method_block"><h3>
589
- <a href='#M000051'>
590
-
591
-
592
- new
593
-
594
- (window, filename_or_rmagick_image, tileable)
595
-
596
- </a>
597
- </h3>
598
- <p>
599
- Loads an image from a given filename that can be drawn onto the given
600
- window.
601
- </p>
602
- <p>
603
- This constructor can handle PNG and BMP images. A color key of ff00ff is
604
- automatically applied to BMP type images. For more flexibility, use PNG
605
- files.
606
- </p>
607
-
608
- <p class="source_link" id="M000051-show-link"><a href="#" onclick="toggle('M000051-source'); toggleText('M000051-link'); return false;" id="M000051-link">Show source...</a></p><div class="source" id="M000051-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 199</span>
609
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">window</span>, <span class="ruby-identifier">filename_or_rmagick_image</span>, <span class="ruby-identifier">tileable</span>); <span class="ruby-keyword kw">end</span></pre></div>
610
- </div>
611
-
612
-
613
- <h1>Public Instance Methods</h1>
614
-
615
-
616
- <a class="small" name="M000053"><br/></a>
617
- <div class="method_block"><h3>
618
- <a href='#M000053'>
619
-
620
-
621
- draw
622
-
623
- (x, y, z, factor_x=1, factor_y=1, color=0xffffffff, mode=:default)
624
-
625
- </a>
626
- </h3>
627
- <p>
628
- Draws the image so its upper left corner is at (x; y).
629
- </p>
630
-
631
- <p class="source_link" id="M000053-show-link"><a href="#" onclick="toggle('M000053-source'); toggleText('M000053-link'); return false;" id="M000053-link">Show source...</a></p><div class="source" id="M000053-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 214</span>
632
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">z</span>, <span class="ruby-identifier">factor_x</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">factor_y</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">color</span>=<span class="ruby-value">0xffffffff</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-identifier">:default</span>); <span class="ruby-keyword kw">end</span></pre></div>
633
- </div>
634
-
635
- <a class="small" name="M000055"><br/></a>
636
- <div class="method_block"><h3>
637
- <a href='#M000055'>
638
-
639
-
640
- draw_as_quad
641
-
642
- (x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z, mode=:default)
643
-
644
- </a>
645
- </h3>
646
- <p>
647
- Like <a href="Window.html#M000045">Window#draw_quad</a>, but with this
648
- texture instead of colors. Can be used to implement advanced,
649
- non-rectangular drawing techniques and takes four points and the modulation
650
- color at each of them. The points can be in clockwise order, or in a Z
651
- shape, starting at the top left.
652
- </p>
653
-
654
- <p class="source_link" id="M000055-show-link"><a href="#" onclick="toggle('M000055-source'); toggleText('M000055-link'); return false;" id="M000055-link">Show source...</a></p><div class="source" id="M000055-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 222</span>
655
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw_as_quad</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">c1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>, <span class="ruby-identifier">c2</span>, <span class="ruby-identifier">x3</span>, <span class="ruby-identifier">y3</span>, <span class="ruby-identifier">c3</span>, <span class="ruby-identifier">x4</span>, <span class="ruby-identifier">y4</span>, <span class="ruby-identifier">c4</span>, <span class="ruby-identifier">z</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-identifier">:default</span>); <span class="ruby-keyword kw">end</span></pre></div>
656
- </div>
657
-
658
- <a class="small" name="M000054"><br/></a>
659
- <div class="method_block"><h3>
660
- <a href='#M000054'>
661
-
662
-
663
- draw_rot
664
-
665
- (x, y, z, angle, center_x=0.5, center_y=0.5, factor_x=1, factor_y=1, color=0xffffffff, mode=:default)
666
-
667
- </a>
668
- </h3>
669
- <table>
670
- <tr><td valign="top">center_x:</td><td>Relative horizontal position of the rotation center on the image. 0 is the
671
- left border, 1 is the right border, 0.5 is the center (and default)
672
-
673
- </td></tr>
674
- <tr><td valign="top">center_y:</td><td>See center_x.
675
-
676
- </td></tr>
677
- </table>
678
-
679
- <p class="source_link" id="M000054-show-link"><a href="#" onclick="toggle('M000054-source'); toggleText('M000054-link'); return false;" id="M000054-link">Show source...</a></p><div class="source" id="M000054-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 218</span>
680
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw_rot</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">z</span>, <span class="ruby-identifier">angle</span>, <span class="ruby-identifier">center_x</span>=<span class="ruby-value">0</span><span class="ruby-value">.5</span>, <span class="ruby-identifier">center_y</span>=<span class="ruby-value">0</span><span class="ruby-value">.5</span>, <span class="ruby-identifier">factor_x</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">factor_y</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">color</span>=<span class="ruby-value">0xffffffff</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-identifier">:default</span>); <span class="ruby-keyword kw">end</span></pre></div>
681
- </div>
682
-
683
- <a class="small" name="M000059"><br/></a>
684
- <div class="method_block"><h3>
685
- <a href='#M000059'>
686
-
687
-
688
- gl_tex_info
689
-
690
- ()
691
-
692
- </a>
693
- </h3>
694
- <p>
695
- See examples/OpenGLIntegration.rb.
696
- </p>
697
-
698
- <p class="source_link" id="M000059-show-link"><a href="#" onclick="toggle('M000059-source'); toggleText('M000059-link'); return false;" id="M000059-link">Show source...</a></p><div class="source" id="M000059-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 253</span>
699
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gl_tex_info</span>; <span class="ruby-keyword kw">end</span></pre></div>
700
- </div>
701
-
702
-
703
-
704
-
705
-
706
- </div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>