gosu 0.7.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. data/COPYING.txt +29 -0
  2. data/Gosu/Async.hpp +48 -0
  3. data/Gosu/Audio.hpp +145 -0
  4. data/Gosu/AutoLink.hpp +16 -0
  5. data/Gosu/Bitmap.hpp +85 -0
  6. data/Gosu/ButtonsMac.hpp +114 -0
  7. data/Gosu/ButtonsWin.hpp +111 -0
  8. data/Gosu/ButtonsX.hpp +115 -0
  9. data/Gosu/Color.hpp +172 -0
  10. data/Gosu/Directories.hpp +36 -0
  11. data/Gosu/Font.hpp +59 -0
  12. data/Gosu/Fwd.hpp +31 -0
  13. data/Gosu/Gosu.hpp +26 -0
  14. data/Gosu/Graphics.hpp +86 -0
  15. data/Gosu/GraphicsBase.hpp +45 -0
  16. data/Gosu/IO.hpp +255 -0
  17. data/Gosu/Image.hpp +148 -0
  18. data/Gosu/ImageData.hpp +45 -0
  19. data/Gosu/Input.hpp +116 -0
  20. data/Gosu/Math.hpp +95 -0
  21. data/Gosu/Platform.hpp +61 -0
  22. data/Gosu/RotFlip.hpp +116 -0
  23. data/Gosu/Sockets.hpp +129 -0
  24. data/Gosu/Text.hpp +47 -0
  25. data/Gosu/TextInput.hpp +57 -0
  26. data/Gosu/Timing.hpp +16 -0
  27. data/Gosu/Utility.hpp +24 -0
  28. data/Gosu/WinUtility.hpp +76 -0
  29. data/Gosu/Window.hpp +84 -0
  30. data/GosuImpl/Async.cpp +37 -0
  31. data/GosuImpl/AudioFmod.cpp +417 -0
  32. data/GosuImpl/AudioSDL.cpp +255 -0
  33. data/GosuImpl/DirectoriesMac.mm +38 -0
  34. data/GosuImpl/DirectoriesUnix.cpp +48 -0
  35. data/GosuImpl/DirectoriesWin.cpp +42 -0
  36. data/GosuImpl/FileUnix.cpp +100 -0
  37. data/GosuImpl/FileWin.cpp +83 -0
  38. data/GosuImpl/Graphics/Bitmap.cpp +116 -0
  39. data/GosuImpl/Graphics/BitmapBMP.cpp +232 -0
  40. data/GosuImpl/Graphics/BitmapColorKey.cpp +39 -0
  41. data/GosuImpl/Graphics/BitmapPNG.cpp +276 -0
  42. data/GosuImpl/Graphics/BitmapUtils.cpp +67 -0
  43. data/GosuImpl/Graphics/BlockAllocator.cpp +127 -0
  44. data/GosuImpl/Graphics/BlockAllocator.hpp +34 -0
  45. data/GosuImpl/Graphics/Color.cpp +126 -0
  46. data/GosuImpl/Graphics/Common.hpp +21 -0
  47. data/GosuImpl/Graphics/DrawOp.hpp +154 -0
  48. data/GosuImpl/Graphics/Font.cpp +110 -0
  49. data/GosuImpl/Graphics/Graphics.cpp +295 -0
  50. data/GosuImpl/Graphics/Image.cpp +159 -0
  51. data/GosuImpl/Graphics/LargeImageData.cpp +115 -0
  52. data/GosuImpl/Graphics/LargeImageData.hpp +37 -0
  53. data/GosuImpl/Graphics/RotFlip.cpp +184 -0
  54. data/GosuImpl/Graphics/TexChunk.cpp +77 -0
  55. data/GosuImpl/Graphics/TexChunk.hpp +40 -0
  56. data/GosuImpl/Graphics/Text.cpp +223 -0
  57. data/GosuImpl/Graphics/TextMac.cpp +242 -0
  58. data/GosuImpl/Graphics/TextPangoFT.cpp +186 -0
  59. data/GosuImpl/Graphics/TextWin.cpp +172 -0
  60. data/GosuImpl/Graphics/Texture.cpp +104 -0
  61. data/GosuImpl/Graphics/Texture.hpp +34 -0
  62. data/GosuImpl/IO.cpp +48 -0
  63. data/GosuImpl/InputMac.mm +677 -0
  64. data/GosuImpl/InputWin.cpp +444 -0
  65. data/GosuImpl/InputX.cpp +158 -0
  66. data/GosuImpl/MacUtility.hpp +48 -0
  67. data/GosuImpl/Math.cpp +49 -0
  68. data/GosuImpl/RubyGosu.swg +474 -0
  69. data/GosuImpl/RubyGosuStub.mm +17 -0
  70. data/GosuImpl/RubyGosu_DllMain.cxx +30 -0
  71. data/GosuImpl/RubyGosu_wrap.cxx +8521 -0
  72. data/GosuImpl/RubyGosu_wrap.h +31 -0
  73. data/GosuImpl/Sockets/CommSocket.cpp +304 -0
  74. data/GosuImpl/Sockets/ListenerSocket.cpp +60 -0
  75. data/GosuImpl/Sockets/MessageSocket.cpp +136 -0
  76. data/GosuImpl/Sockets/Socket.cpp +145 -0
  77. data/GosuImpl/Sockets/Sockets.hpp +66 -0
  78. data/GosuImpl/TextInputMac.mm +207 -0
  79. data/GosuImpl/TextInputWin.cpp +197 -0
  80. data/GosuImpl/TextInputX.cpp +201 -0
  81. data/GosuImpl/TextTTFWin.cpp +247 -0
  82. data/GosuImpl/TimingUnix.cpp +17 -0
  83. data/GosuImpl/TimingWin.cpp +28 -0
  84. data/GosuImpl/Utility.cpp +140 -0
  85. data/GosuImpl/WinMain.cpp +69 -0
  86. data/GosuImpl/WinUtility.cpp +137 -0
  87. data/GosuImpl/WindowMac.mm +466 -0
  88. data/GosuImpl/WindowWin.cpp +447 -0
  89. data/GosuImpl/WindowX.cpp +392 -0
  90. data/GosuImpl/X11vroot.h +118 -0
  91. data/README.txt +13 -0
  92. data/Rakefile +178 -0
  93. data/examples/ChipmunkIntegration.rb +275 -0
  94. data/examples/CptnRuby.rb +231 -0
  95. data/examples/MoreChipmunkAndRMagick.rb +155 -0
  96. data/examples/OpenGLIntegration.rb +232 -0
  97. data/examples/RMagickIntegration.rb +449 -0
  98. data/examples/TextInput.cpp +170 -0
  99. data/examples/TextInput.rb +139 -0
  100. data/examples/Tutorial.cpp +215 -0
  101. data/examples/Tutorial.rb +137 -0
  102. data/examples/media/Beep.wav +0 -0
  103. data/examples/media/CptnRuby Gem.png +0 -0
  104. data/examples/media/CptnRuby Map.txt +25 -0
  105. data/examples/media/CptnRuby Tileset.png +0 -0
  106. data/examples/media/CptnRuby.png +0 -0
  107. data/examples/media/Cursor.png +0 -0
  108. data/examples/media/Earth.png +0 -0
  109. data/examples/media/Explosion.wav +0 -0
  110. data/examples/media/LargeStar.png +0 -0
  111. data/examples/media/Sky.jpg +0 -0
  112. data/examples/media/Smoke.png +0 -0
  113. data/examples/media/Soldier.png +0 -0
  114. data/examples/media/Space.png +0 -0
  115. data/examples/media/Star.png +0 -0
  116. data/examples/media/Starfighter.bmp +0 -0
  117. data/linux/Makefile.in +98 -0
  118. data/linux/configure +5658 -0
  119. data/linux/configure.ac +126 -0
  120. data/linux/extconf.rb +11 -0
  121. data/mac/English.lproj/InfoPlist.strings +0 -0
  122. data/mac/Gosu-Info.plist +26 -0
  123. data/mac/Gosu.xcodeproj/project.pbxproj +1194 -0
  124. data/mac/RubyGosu Template-Info.plist +26 -0
  125. data/mac/libboost_thread_1_34_1_universal.a +0 -0
  126. data/mac/libboost_thread_d_1_34_1_universal.a +0 -0
  127. data/mac/libfmod_universal.a +0 -0
  128. data/mac/libpng_universal.a +0 -0
  129. data/mac/libz_universal.a +0 -0
  130. data/reference/Async_8hpp-source.html +70 -0
  131. data/reference/Audio_8hpp-source.html +114 -0
  132. data/reference/Audio_8hpp.html +50 -0
  133. data/reference/AutoLink_8hpp-source.html +38 -0
  134. data/reference/AutoLink_8hpp.html +34 -0
  135. data/reference/Bitmap_8hpp-source.html +85 -0
  136. data/reference/Bitmap_8hpp.html +58 -0
  137. data/reference/ButtonsMac_8hpp-source.html +133 -0
  138. data/reference/ButtonsWin_8hpp-source.html +133 -0
  139. data/reference/ButtonsX_8hpp-source.html +134 -0
  140. data/reference/Color_8hpp-source.html +169 -0
  141. data/reference/Color_8hpp.html +85 -0
  142. data/reference/Directories_8hpp-source.html +42 -0
  143. data/reference/Directories_8hpp.html +46 -0
  144. data/reference/Font_8hpp-source.html +65 -0
  145. data/reference/Font_8hpp.html +41 -0
  146. data/reference/Fwd_8hpp-source.html +52 -0
  147. data/reference/Fwd_8hpp.html +37 -0
  148. data/reference/Gosu_8hpp-source.html +48 -0
  149. data/reference/Gosu_8hpp.html +34 -0
  150. data/reference/GraphicsBase_8hpp-source.html +57 -0
  151. data/reference/GraphicsBase_8hpp.html +56 -0
  152. data/reference/Graphics_8hpp-source.html +96 -0
  153. data/reference/Graphics_8hpp.html +53 -0
  154. data/reference/IO_8hpp-source.html +255 -0
  155. data/reference/IO_8hpp.html +74 -0
  156. data/reference/ImageData_8hpp-source.html +62 -0
  157. data/reference/ImageData_8hpp.html +43 -0
  158. data/reference/Image_8hpp-source.html +126 -0
  159. data/reference/Image_8hpp.html +48 -0
  160. data/reference/Input_8hpp-source.html +118 -0
  161. data/reference/Input_8hpp.html +50 -0
  162. data/reference/Math_8hpp-source.html +92 -0
  163. data/reference/Math_8hpp.html +74 -0
  164. data/reference/Platform_8hpp-source.html +83 -0
  165. data/reference/Platform_8hpp.html +73 -0
  166. data/reference/RotFlip_8hpp-source.html +138 -0
  167. data/reference/RotFlip_8hpp.html +77 -0
  168. data/reference/Sockets_8hpp-source.html +130 -0
  169. data/reference/Sockets_8hpp.html +66 -0
  170. data/reference/TextInput_8hpp-source.html +64 -0
  171. data/reference/TextInput_8hpp.html +41 -0
  172. data/reference/Text_8hpp-source.html +51 -0
  173. data/reference/Text_8hpp.html +46 -0
  174. data/reference/Timing_8hpp-source.html +36 -0
  175. data/reference/Timing_8hpp.html +42 -0
  176. data/reference/Utility_8hpp-source.html +44 -0
  177. data/reference/Utility_8hpp.html +48 -0
  178. data/reference/WinUtility_8hpp-source.html +79 -0
  179. data/reference/WinUtility_8hpp.html +64 -0
  180. data/reference/Window_8hpp-source.html +91 -0
  181. data/reference/Window_8hpp.html +41 -0
  182. data/reference/annotated.html +51 -0
  183. data/reference/classGosu_1_1Audio-members.html +34 -0
  184. data/reference/classGosu_1_1Audio.html +46 -0
  185. data/reference/classGosu_1_1Bitmap-members.html +44 -0
  186. data/reference/classGosu_1_1Bitmap.html +263 -0
  187. data/reference/classGosu_1_1Buffer-members.html +44 -0
  188. data/reference/classGosu_1_1Buffer.html +78 -0
  189. data/reference/classGosu_1_1Buffer.png +0 -0
  190. data/reference/classGosu_1_1Button-members.html +36 -0
  191. data/reference/classGosu_1_1Button.html +143 -0
  192. data/reference/classGosu_1_1Color-members.html +56 -0
  193. data/reference/classGosu_1_1Color.html +387 -0
  194. data/reference/classGosu_1_1File-members.html +41 -0
  195. data/reference/classGosu_1_1File.html +69 -0
  196. data/reference/classGosu_1_1File.png +0 -0
  197. data/reference/classGosu_1_1Font-members.html +39 -0
  198. data/reference/classGosu_1_1Font.html +309 -0
  199. data/reference/classGosu_1_1Graphics-members.html +50 -0
  200. data/reference/classGosu_1_1Graphics.html +234 -0
  201. data/reference/classGosu_1_1Image-members.html +45 -0
  202. data/reference/classGosu_1_1Image.html +518 -0
  203. data/reference/classGosu_1_1ImageData-members.html +37 -0
  204. data/reference/classGosu_1_1ImageData.html +60 -0
  205. data/reference/classGosu_1_1Input-members.html +44 -0
  206. data/reference/classGosu_1_1Input.html +223 -0
  207. data/reference/classGosu_1_1MessageSocket-members.html +40 -0
  208. data/reference/classGosu_1_1MessageSocket.html +233 -0
  209. data/reference/classGosu_1_1Resource-members.html +39 -0
  210. data/reference/classGosu_1_1Resource.html +116 -0
  211. data/reference/classGosu_1_1Resource.png +0 -0
  212. data/reference/classGosu_1_1Sample-members.html +37 -0
  213. data/reference/classGosu_1_1Sample.html +200 -0
  214. data/reference/classGosu_1_1SampleInstance-members.html +38 -0
  215. data/reference/classGosu_1_1SampleInstance.html +169 -0
  216. data/reference/classGosu_1_1Song-members.html +43 -0
  217. data/reference/classGosu_1_1Song.html +260 -0
  218. data/reference/classGosu_1_1TextInput-members.html +38 -0
  219. data/reference/classGosu_1_1TextInput.html +121 -0
  220. data/reference/classGosu_1_1Window-members.html +50 -0
  221. data/reference/classGosu_1_1Window.html +271 -0
  222. data/reference/doxyfile +233 -0
  223. data/reference/doxygen.css +433 -0
  224. data/reference/doxygen.png +0 -0
  225. data/reference/files.html +54 -0
  226. data/reference/functions.html +236 -0
  227. data/reference/functions_enum.html +45 -0
  228. data/reference/functions_func.html +227 -0
  229. data/reference/functions_vars.html +47 -0
  230. data/reference/hierarchy.html +53 -0
  231. data/reference/index.html +26 -0
  232. data/reference/namespaceGosu.html +2890 -0
  233. data/reference/namespaceGosu_1_1Colors.html +70 -0
  234. data/reference/namespaceGosu_1_1Win.html +275 -0
  235. data/reference/namespacemembers.html +216 -0
  236. data/reference/namespacemembers_enum.html +52 -0
  237. data/reference/namespacemembers_eval.html +54 -0
  238. data/reference/namespacemembers_func.html +185 -0
  239. data/reference/namespacemembers_type.html +46 -0
  240. data/reference/namespacemembers_vars.html +46 -0
  241. data/reference/namespaces.html +35 -0
  242. data/reference/tab_b.gif +0 -0
  243. data/reference/tab_l.gif +0 -0
  244. data/reference/tab_r.gif +0 -0
  245. data/reference/tabs.css +102 -0
  246. data/windows/Gosu.sln +29 -0
  247. data/windows/Gosu.vcproj +553 -0
  248. data/windows/RubyGosu.vcproj +138 -0
  249. metadata +305 -0
@@ -0,0 +1,74 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
+ <title>Gosu: IO.hpp File Reference</title>
4
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
5
+ <link href="tabs.css" rel="stylesheet" type="text/css">
6
+ </head><body>
7
+ <!-- Generated by Doxygen 1.5.5 -->
8
+ <div class="navigation" id="top">
9
+ <div class="tabs">
10
+ <ul>
11
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
+ <li><a href="annotated.html"><span>Classes</span></a></li>
14
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
15
+ </ul>
16
+ </div>
17
+ </div>
18
+ <div class="contents">
19
+ <h1>IO.hpp File Reference</h1>Contains everything related to input and output. <a href="#_details">More...</a>
20
+ <p>
21
+
22
+ <p>
23
+ <a href="IO_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
24
+ <tr><td></td></tr>
25
+ <tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
26
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html">Gosu</a></td></tr>
27
+
28
+ <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
29
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>Gosu::Reader</b></td></tr>
30
+
31
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>Gosu::Writer</b></td></tr>
32
+
33
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1Resource.html">Gosu::Resource</a></td></tr>
34
+
35
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Base class for resources. <a href="classGosu_1_1Resource.html#_details">More...</a><br></td></tr>
36
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1Buffer.html">Gosu::Buffer</a></td></tr>
37
+
38
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Piece of memory with the <a class="el" href="classGosu_1_1Resource.html" title="Base class for resources.">Resource</a> interface. <a href="classGosu_1_1Buffer.html#_details">More...</a><br></td></tr>
39
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1File.html">Gosu::File</a></td></tr>
40
+
41
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classGosu_1_1File.html" title="File with the Resource interface.">File</a> with the <a class="el" href="classGosu_1_1Resource.html" title="Base class for resources.">Resource</a> interface. <a href="classGosu_1_1File.html#_details">More...</a><br></td></tr>
42
+ <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
43
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>ByteOrder</b> { <b>boLittle</b>,
44
+ <b>boBig</b>,
45
+ <b>boDontCare</b>
46
+ }</td></tr>
47
+
48
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">Gosu::FileMode</a> { <a class="el" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8">Gosu::fmRead</a>,
49
+ <a class="el" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246">Gosu::fmReplace</a>,
50
+ <a class="el" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3d09b16bbdaf86e8a38a7299abad2706d">Gosu::fmAlter</a>
51
+ }</td></tr>
52
+
53
+ <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
54
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#29c60cb8e87a99f7ce924ae0530029a0">Gosu::loadFile</a> (Buffer &amp;buffer, const std::wstring &amp;filename)</td></tr>
55
+
56
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#467aa346fa1a4cb39040bb427b42b7aa">Gosu::saveFile</a> (const Buffer &amp;buffer, const std::wstring &amp;filename)</td></tr>
57
+
58
+ <tr><td colspan="2"><br><h2>Variables</h2></td></tr>
59
+ <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ead4502f3e95077f5e128d1ff6bae819"></a><!-- doxytag: member="IO.hpp::nativeByteOrder" ref="ead4502f3e95077f5e128d1ff6bae819" args="" -->
60
+ const ByteOrder&nbsp;</td><td class="memItemRight" valign="bottom"><b>Gosu::nativeByteOrder</b> = boLittle</td></tr>
61
+
62
+ <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1ccccbaef42335e16689c5fc2f1f936"></a><!-- doxytag: member="IO.hpp::otherByteOrder" ref="b1ccccbaef42335e16689c5fc2f1f936" args="" -->
63
+ const ByteOrder&nbsp;</td><td class="memItemRight" valign="bottom"><b>Gosu::otherByteOrder</b> = boBig</td></tr>
64
+
65
+ </table>
66
+ <hr><a name="_details"></a><h2>Detailed Description</h2>
67
+ Contains everything related to input and output.
68
+ <p>
69
+ </div>
70
+ <hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by&nbsp;
71
+ <a href="http://www.doxygen.org/index.html">
72
+ <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
73
+ </body>
74
+ </html>
@@ -0,0 +1,62 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
+ <title>Gosu: ImageData.hpp Source File</title>
4
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
5
+ <link href="tabs.css" rel="stylesheet" type="text/css">
6
+ </head><body>
7
+ <!-- Generated by Doxygen 1.5.5 -->
8
+ <div class="navigation" id="top">
9
+ <div class="tabs">
10
+ <ul>
11
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
+ <li><a href="annotated.html"><span>Classes</span></a></li>
14
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
15
+ </ul>
16
+ </div>
17
+ <h1>ImageData.hpp</h1><a href="ImageData_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
18
+ <a name="l00002"></a>00002
19
+ <a name="l00003"></a>00003
20
+ <a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_IMAGEDATA_HPP</span>
21
+ <a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_IMAGEDATA_HPP</span>
22
+ <a name="l00006"></a>00006 <span class="preprocessor"></span>
23
+ <a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="Color_8hpp.html" title="Interface of the Color class.">Gosu/Color.hpp</a>&gt;</span>
24
+ <a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="GraphicsBase_8hpp.html" title="Contains general typedefs and enums related to graphics.">Gosu/GraphicsBase.hpp</a>&gt;</span>
25
+ <a name="l00009"></a>00009 <span class="preprocessor">#include &lt;boost/optional.hpp&gt;</span>
26
+ <a name="l00010"></a>00010 <span class="preprocessor">#include &lt;boost/utility.hpp&gt;</span>
27
+ <a name="l00011"></a>00011
28
+ <a name="l00012"></a>00012 <span class="keyword">namespace </span>Gosu
29
+ <a name="l00013"></a>00013 {
30
+ <a name="l00014"></a>00014 <span class="keyword">struct </span>GLTexInfo
31
+ <a name="l00015"></a>00015 {
32
+ <a name="l00016"></a>00016 <span class="keywordtype">int</span> texName;
33
+ <a name="l00017"></a>00017 <span class="keywordtype">double</span> left, right, top, bottom;
34
+ <a name="l00018"></a>00018 };
35
+ <a name="l00019"></a>00019
36
+ <a name="l00025"></a><a class="code" href="classGosu_1_1ImageData.html">00025</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1ImageData.html" title="The ImageData class is an abstract base class for drawable images.">ImageData</a> : boost::noncopyable
37
+ <a name="l00026"></a>00026 {
38
+ <a name="l00027"></a>00027 <span class="keyword">public</span>:
39
+ <a name="l00028"></a>00028 <span class="keyword">virtual</span> ~<a class="code" href="classGosu_1_1ImageData.html" title="The ImageData class is an abstract base class for drawable images.">ImageData</a>()
40
+ <a name="l00029"></a>00029 {
41
+ <a name="l00030"></a>00030 }
42
+ <a name="l00031"></a>00031
43
+ <a name="l00032"></a>00032 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> width() <span class="keyword">const</span> = 0;
44
+ <a name="l00033"></a>00033 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> height() <span class="keyword">const</span> = 0;
45
+ <a name="l00034"></a>00034
46
+ <a name="l00035"></a>00035 <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw(<span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1,
47
+ <a name="l00036"></a>00036 <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2,
48
+ <a name="l00037"></a>00037 <span class="keywordtype">double</span> x3, <span class="keywordtype">double</span> y3, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3,
49
+ <a name="l00038"></a>00038 <span class="keywordtype">double</span> x4, <span class="keywordtype">double</span> y4, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c4,
50
+ <a name="l00039"></a>00039 <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&amp;#39;s graphics system.">ZPos</a> z, <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode) <span class="keyword">const</span> = 0;
51
+ <a name="l00040"></a>00040
52
+ <a name="l00041"></a>00041 <span class="keyword">virtual</span> boost::optional&lt;GLTexInfo&gt; glTexInfo() <span class="keyword">const</span> = 0;
53
+ <a name="l00042"></a>00042 };
54
+ <a name="l00043"></a>00043 }
55
+ <a name="l00044"></a>00044
56
+ <a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
57
+ </pre></div></div>
58
+ <hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by&nbsp;
59
+ <a href="http://www.doxygen.org/index.html">
60
+ <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
61
+ </body>
62
+ </html>
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
+ <title>Gosu: ImageData.hpp File Reference</title>
4
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
5
+ <link href="tabs.css" rel="stylesheet" type="text/css">
6
+ </head><body>
7
+ <!-- Generated by Doxygen 1.5.5 -->
8
+ <div class="navigation" id="top">
9
+ <div class="tabs">
10
+ <ul>
11
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
+ <li><a href="annotated.html"><span>Classes</span></a></li>
14
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
15
+ </ul>
16
+ </div>
17
+ </div>
18
+ <div class="contents">
19
+ <h1>ImageData.hpp File Reference</h1>Interface of the ImageData class. <a href="#_details">More...</a>
20
+ <p>
21
+
22
+ <p>
23
+ <a href="ImageData_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
24
+ <tr><td></td></tr>
25
+ <tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
26
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html">Gosu</a></td></tr>
27
+
28
+ <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
29
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>Gosu::GLTexInfo</b></td></tr>
30
+
31
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1ImageData.html">Gosu::ImageData</a></td></tr>
32
+
33
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The <a class="el" href="classGosu_1_1ImageData.html" title="The ImageData class is an abstract base class for drawable images.">ImageData</a> class is an abstract base class for drawable images. <a href="classGosu_1_1ImageData.html#_details">More...</a><br></td></tr>
34
+ </table>
35
+ <hr><a name="_details"></a><h2>Detailed Description</h2>
36
+ Interface of the ImageData class.
37
+ <p>
38
+ </div>
39
+ <hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by&nbsp;
40
+ <a href="http://www.doxygen.org/index.html">
41
+ <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
42
+ </body>
43
+ </html>
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
+ <title>Gosu: Image.hpp Source File</title>
4
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
5
+ <link href="tabs.css" rel="stylesheet" type="text/css">
6
+ </head><body>
7
+ <!-- Generated by Doxygen 1.5.5 -->
8
+ <div class="navigation" id="top">
9
+ <div class="tabs">
10
+ <ul>
11
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
+ <li><a href="annotated.html"><span>Classes</span></a></li>
14
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
15
+ </ul>
16
+ </div>
17
+ <h1>Image.hpp</h1><a href="Image_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
18
+ <a name="l00002"></a>00002
19
+ <a name="l00003"></a>00003
20
+ <a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_IMAGE_HPP</span>
21
+ <a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_IMAGE_HPP</span>
22
+ <a name="l00006"></a>00006 <span class="preprocessor"></span>
23
+ <a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="Fwd_8hpp.html" title="Contains declarations of all of Gosu&amp;#39;s available classes.">Gosu/Fwd.hpp</a>&gt;</span>
24
+ <a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="Bitmap_8hpp.html" title="Interface of the Bitmap class.">Gosu/Bitmap.hpp</a>&gt;</span>
25
+ <a name="l00009"></a>00009 <span class="preprocessor">#include &lt;<a class="code" href="RotFlip_8hpp.html" title="Interface of the undocumented RotFlip class.">Gosu/RotFlip.hpp</a>&gt;</span>
26
+ <a name="l00010"></a>00010 <span class="preprocessor">#include &lt;boost/scoped_ptr.hpp&gt;</span>
27
+ <a name="l00011"></a>00011
28
+ <a name="l00012"></a>00012 <span class="keyword">namespace </span>Gosu
29
+ <a name="l00013"></a>00013 {
30
+ <a name="l00015"></a><a class="code" href="classGosu_1_1Image.html">00015</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1Image.html" title="Provides functionality for drawing rectangular images.">Image</a>
31
+ <a name="l00016"></a>00016 {
32
+ <a name="l00017"></a>00017 boost::scoped_ptr&lt;ImageData&gt; data;
33
+ <a name="l00018"></a>00018
34
+ <a name="l00019"></a>00019 <span class="keyword">public</span>:
35
+ <a name="l00025"></a>00025 <a class="code" href="classGosu_1_1Image.html#b7d4a07a578bc751f446bd60954ed0cd" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>&amp; graphics, <span class="keyword">const</span> std::wstring&amp; filename,
36
+ <a name="l00026"></a>00026 <span class="keywordtype">bool</span> hardBorders = <span class="keyword">false</span>);
37
+ <a name="l00032"></a>00032 <a class="code" href="classGosu_1_1Image.html#b7d4a07a578bc751f446bd60954ed0cd" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>&amp; graphics, <span class="keyword">const</span> std::wstring&amp; filename, <span class="keywordtype">unsigned</span> srcX,
38
+ <a name="l00033"></a>00033 <span class="keywordtype">unsigned</span> srcY, <span class="keywordtype">unsigned</span> srcWidth, <span class="keywordtype">unsigned</span> srcHeight,
39
+ <a name="l00034"></a>00034 <span class="keywordtype">bool</span> hardBorders = <span class="keyword">false</span>);
40
+ <a name="l00035"></a>00035
41
+ <a name="l00038"></a>00038 <a class="code" href="classGosu_1_1Image.html#b7d4a07a578bc751f446bd60954ed0cd" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>&amp; graphics, <span class="keyword">const</span> <a class="code" href="classGosu_1_1Bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>&amp; source,
42
+ <a name="l00039"></a>00039 <span class="keywordtype">bool</span> hardBorders = <span class="keyword">false</span>);
43
+ <a name="l00042"></a>00042 <a class="code" href="classGosu_1_1Image.html#b7d4a07a578bc751f446bd60954ed0cd" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>&amp; graphics, <span class="keyword">const</span> <a class="code" href="classGosu_1_1Bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>&amp; source, <span class="keywordtype">unsigned</span> srcX,
44
+ <a name="l00043"></a>00043 <span class="keywordtype">unsigned</span> srcY, <span class="keywordtype">unsigned</span> srcWidth, <span class="keywordtype">unsigned</span> srcHeight,
45
+ <a name="l00044"></a>00044 <span class="keywordtype">bool</span> hardBorders = <span class="keyword">false</span>);
46
+ <a name="l00045"></a>00045
47
+ <a name="l00046"></a>00046 ~<a class="code" href="classGosu_1_1Image.html" title="Provides functionality for drawing rectangular images.">Image</a>();
48
+ <a name="l00047"></a>00047
49
+ <a name="l00048"></a>00048 <span class="keywordtype">unsigned</span> width() <span class="keyword">const</span>;
50
+ <a name="l00049"></a>00049 <span class="keywordtype">unsigned</span> height() <span class="keyword">const</span>;
51
+ <a name="l00050"></a>00050
52
+ <a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Image.html#7e6de0cae934109ba6c96434767f9540" title="Draws the image so its upper left corner is at (x; y).">draw</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&amp;#39;s graphics system.">ZPos</a> z,
53
+ <a name="l00053"></a>00053 <span class="keywordtype">double</span> factorX = 1, <span class="keywordtype">double</span> factorY = 1,
54
+ <a name="l00054"></a>00054 <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c = Colors::white,
55
+ <a name="l00055"></a>00055 <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&amp;#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
56
+ <a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Image.html#6ee7e13d1def74cbf5e974fdc3b045a1" title="Like draw(), but allows to give modulation colors for all four corners.">drawMod</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&amp;#39;s graphics system.">ZPos</a> z,
57
+ <a name="l00059"></a>00059 <span class="keywordtype">double</span> factorX, <span class="keywordtype">double</span> factorY,
58
+ <a name="l00060"></a>00060 <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c4,
59
+ <a name="l00061"></a>00061 <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&amp;#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
60
+ <a name="l00062"></a>00062
61
+ <a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Image.html#9333d4cb15b761020a82a41357ccb674" title="Draws the image rotated by the given angle so that its rotation center is at (x;...">drawRot</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&amp;#39;s graphics system.">ZPos</a> z,
62
+ <a name="l00073"></a>00073 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>, <span class="keywordtype">double</span> centerX = 0.5, <span class="keywordtype">double</span> centerY = 0.5,
63
+ <a name="l00074"></a>00074 <span class="keywordtype">double</span> factorX = 1, <span class="keywordtype">double</span> factorY = 1,
64
+ <a name="l00075"></a>00075 <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c = Colors::white,
65
+ <a name="l00076"></a>00076 <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&amp;#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
66
+ <a name="l00077"></a>00077
67
+ <a name="l00078"></a>00078 <span class="preprocessor"> #ifndef SWIG</span>
68
+ <a name="l00079"></a>00079 <span class="preprocessor"></span> <span class="keywordtype">void</span> drawRotFlip(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&amp;#39;s graphics system.">ZPos</a> z,
69
+ <a name="l00080"></a>00080 RotFlip rf,
70
+ <a name="l00081"></a>00081 <span class="keywordtype">double</span> factorX = 1, <span class="keywordtype">double</span> factorY = 1,
71
+ <a name="l00082"></a>00082 <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c = Colors::white,
72
+ <a name="l00083"></a>00083 <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&amp;#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
73
+ <a name="l00084"></a>00084 <span class="keywordtype">void</span> drawRotFlipMod(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&amp;#39;s graphics system.">ZPos</a> z,
74
+ <a name="l00085"></a>00085 RotFlip rf,
75
+ <a name="l00086"></a>00086 <span class="keywordtype">double</span> factorX, <span class="keywordtype">double</span> factorY,
76
+ <a name="l00087"></a>00087 <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c4,
77
+ <a name="l00088"></a>00088 <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&amp;#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
78
+ <a name="l00089"></a>00089
79
+ <a name="l00091"></a>00091 <span class="keyword">const</span> <a class="code" href="classGosu_1_1ImageData.html" title="The ImageData class is an abstract base class for drawable images.">ImageData</a>&amp; <a class="code" href="classGosu_1_1Image.html#cbd542bae8e42ccc72442326e578c2c2" title="Provides access to the underlying image data object.">getData</a>() <span class="keyword">const</span>;
80
+ <a name="l00092"></a>00092 <span class="preprocessor"> #endif</span>
81
+ <a name="l00093"></a>00093 <span class="preprocessor"></span> };
82
+ <a name="l00094"></a>00094
83
+ <a name="l00103"></a>00103 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Container&gt;
84
+ <a name="l00104"></a><a class="code" href="namespaceGosu.html#b347c1ac66f7c276cc505acb62947b23">00104</a> <span class="keywordtype">void</span> <a class="code" href="namespaceGosu.html#b347c1ac66f7c276cc505acb62947b23" title="Convenience function that splits a BMP or PNG file into an area of small rectangles...">imagesFromTiledBitmap</a>(<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>&amp; graphics, <span class="keyword">const</span> std::wstring&amp; filename,
85
+ <a name="l00105"></a>00105 <span class="keywordtype">int</span> tileWidth, <span class="keywordtype">int</span> tileHeight, <span class="keywordtype">bool</span> hardBorders, Container&amp; appendTo)
86
+ <a name="l00106"></a>00106 {
87
+ <a name="l00107"></a>00107 <a class="code" href="namespaceGosu.html#b347c1ac66f7c276cc505acb62947b23" title="Convenience function that splits a BMP or PNG file into an area of small rectangles...">imagesFromTiledBitmap</a>(graphics, quickLoadBitmap(filename), tileWidth, tileHeight, hardBorders, appendTo);
88
+ <a name="l00108"></a>00108 }
89
+ <a name="l00109"></a>00109
90
+ <a name="l00118"></a>00118 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Container&gt;
91
+ <a name="l00119"></a><a class="code" href="namespaceGosu.html#823d62ccac7a28ea78ea0a987687d649">00119</a> <span class="keywordtype">void</span> <a class="code" href="namespaceGosu.html#b347c1ac66f7c276cc505acb62947b23" title="Convenience function that splits a BMP or PNG file into an area of small rectangles...">imagesFromTiledBitmap</a>(<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>&amp; graphics, <span class="keyword">const</span> <a class="code" href="classGosu_1_1Bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>&amp; bmp,
92
+ <a name="l00120"></a>00120 <span class="keywordtype">int</span> tileWidth, <span class="keywordtype">int</span> tileHeight, <span class="keywordtype">bool</span> hardBorders, Container&amp; appendTo)
93
+ <a name="l00121"></a>00121 {
94
+ <a name="l00122"></a>00122 <span class="keywordtype">int</span> tilesX, tilesY;
95
+ <a name="l00123"></a>00123
96
+ <a name="l00124"></a>00124 <span class="keywordflow">if</span> (tileWidth &gt; 0)
97
+ <a name="l00125"></a>00125 tilesX = bmp.<a class="code" href="classGosu_1_1Bitmap.html#eb1d21d261788c77aba770361ccdb09f">width</a>() / tileWidth;
98
+ <a name="l00126"></a>00126 <span class="keywordflow">else</span>
99
+ <a name="l00127"></a>00127 {
100
+ <a name="l00128"></a>00128 tilesX = -tileWidth;
101
+ <a name="l00129"></a>00129 tileWidth = bmp.<a class="code" href="classGosu_1_1Bitmap.html#eb1d21d261788c77aba770361ccdb09f">width</a>() / tilesX;
102
+ <a name="l00130"></a>00130 }
103
+ <a name="l00131"></a>00131
104
+ <a name="l00132"></a>00132 <span class="keywordflow">if</span> (tileHeight &gt; 0)
105
+ <a name="l00133"></a>00133 tilesY = bmp.<a class="code" href="classGosu_1_1Bitmap.html#fc5a1fdaaf0453834c3b9ac13342eae6">height</a>() / tileHeight;
106
+ <a name="l00134"></a>00134 <span class="keywordflow">else</span>
107
+ <a name="l00135"></a>00135 {
108
+ <a name="l00136"></a>00136 tilesY = -tileHeight;
109
+ <a name="l00137"></a>00137 tileHeight = bmp.<a class="code" href="classGosu_1_1Bitmap.html#fc5a1fdaaf0453834c3b9ac13342eae6">height</a>() / tilesY;
110
+ <a name="l00138"></a>00138 }
111
+ <a name="l00139"></a>00139
112
+ <a name="l00140"></a>00140 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = 0; y &lt; tilesY; ++y)
113
+ <a name="l00141"></a>00141 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = 0; x &lt; tilesX; ++x)
114
+ <a name="l00142"></a>00142 appendTo.push_back(<span class="keyword">typename</span> Container::value_type(<span class="keyword">new</span> <a class="code" href="classGosu_1_1Image.html" title="Provides functionality for drawing rectangular images.">Image</a>(graphics, bmp,
115
+ <a name="l00143"></a>00143 x * tileWidth, y * tileHeight, tileWidth, tileHeight,
116
+ <a name="l00144"></a>00144 hardBorders)));
117
+ <a name="l00145"></a>00145 }
118
+ <a name="l00146"></a>00146 }
119
+ <a name="l00147"></a>00147
120
+ <a name="l00148"></a>00148 <span class="preprocessor">#endif</span>
121
+ </pre></div></div>
122
+ <hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by&nbsp;
123
+ <a href="http://www.doxygen.org/index.html">
124
+ <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
125
+ </body>
126
+ </html>
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
+ <title>Gosu: Image.hpp File Reference</title>
4
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
5
+ <link href="tabs.css" rel="stylesheet" type="text/css">
6
+ </head><body>
7
+ <!-- Generated by Doxygen 1.5.5 -->
8
+ <div class="navigation" id="top">
9
+ <div class="tabs">
10
+ <ul>
11
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
+ <li><a href="annotated.html"><span>Classes</span></a></li>
14
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
15
+ </ul>
16
+ </div>
17
+ </div>
18
+ <div class="contents">
19
+ <h1>Image.hpp File Reference</h1>Interface of the Image class and helper functions. <a href="#_details">More...</a>
20
+ <p>
21
+
22
+ <p>
23
+ <a href="Image_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
24
+ <tr><td></td></tr>
25
+ <tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
26
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html">Gosu</a></td></tr>
27
+
28
+ <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
29
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1Image.html">Gosu::Image</a></td></tr>
30
+
31
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides functionality for drawing rectangular images. <a href="classGosu_1_1Image.html#_details">More...</a><br></td></tr>
32
+ <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
33
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Container&gt; </td></tr>
34
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#b347c1ac66f7c276cc505acb62947b23">Gosu::imagesFromTiledBitmap</a> (Graphics &amp;graphics, const std::wstring &amp;filename, int tileWidth, int tileHeight, bool hardBorders, Container &amp;appendTo)</td></tr>
35
+
36
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Container&gt; </td></tr>
37
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#823d62ccac7a28ea78ea0a987687d649">Gosu::imagesFromTiledBitmap</a> (Graphics &amp;graphics, const Bitmap &amp;bmp, int tileWidth, int tileHeight, bool hardBorders, Container &amp;appendTo)</td></tr>
38
+
39
+ </table>
40
+ <hr><a name="_details"></a><h2>Detailed Description</h2>
41
+ Interface of the Image class and helper functions.
42
+ <p>
43
+ </div>
44
+ <hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by&nbsp;
45
+ <a href="http://www.doxygen.org/index.html">
46
+ <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
47
+ </body>
48
+ </html>
@@ -0,0 +1,118 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
+ <title>Gosu: Input.hpp Source File</title>
4
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
5
+ <link href="tabs.css" rel="stylesheet" type="text/css">
6
+ </head><body>
7
+ <!-- Generated by Doxygen 1.5.5 -->
8
+ <div class="navigation" id="top">
9
+ <div class="tabs">
10
+ <ul>
11
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
+ <li><a href="annotated.html"><span>Classes</span></a></li>
14
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
15
+ </ul>
16
+ </div>
17
+ <h1>Input.hpp</h1><a href="Input_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
18
+ <a name="l00002"></a>00002
19
+ <a name="l00003"></a>00003
20
+ <a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_INPUT_HPP</span>
21
+ <a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_INPUT_HPP</span>
22
+ <a name="l00006"></a>00006 <span class="preprocessor"></span>
23
+ <a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="Fwd_8hpp.html" title="Contains declarations of all of Gosu&amp;#39;s available classes.">Gosu/Fwd.hpp</a>&gt;</span>
24
+ <a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="Platform_8hpp.html" title="Macros and utility functions to facilitate programming on all of Gosu&amp;#39;s supported...">Gosu/Platform.hpp</a>&gt;</span>
25
+ <a name="l00009"></a>00009
26
+ <a name="l00010"></a>00010 <span class="preprocessor">#ifdef GOSU_IS_WIN</span>
27
+ <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Gosu/ButtonsWin.hpp&gt;</span>
28
+ <a name="l00012"></a>00012 <span class="preprocessor">#include &lt;windows.h&gt;</span>
29
+ <a name="l00013"></a>00013 <span class="preprocessor">#endif</span>
30
+ <a name="l00014"></a>00014 <span class="preprocessor"></span>
31
+ <a name="l00015"></a>00015 <span class="preprocessor">#ifdef GOSU_IS_MAC</span>
32
+ <a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Gosu/ButtonsMac.hpp&gt;</span>
33
+ <a name="l00017"></a>00017 <span class="preprocessor">#endif</span>
34
+ <a name="l00018"></a>00018 <span class="preprocessor"></span>
35
+ <a name="l00019"></a>00019 <span class="preprocessor">#ifdef GOSU_IS_X</span>
36
+ <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#include &lt;X11/Xlib.h&gt;</span>
37
+ <a name="l00021"></a>00021 <span class="preprocessor">#include &lt;X11/Xutil.h&gt;</span>
38
+ <a name="l00022"></a>00022 <span class="preprocessor">#include &lt;X11/keysym.h&gt;</span>
39
+ <a name="l00023"></a>00023 <span class="preprocessor">#include &lt;Gosu/ButtonsX.hpp&gt;</span>
40
+ <a name="l00024"></a>00024 <span class="preprocessor">#endif</span>
41
+ <a name="l00025"></a>00025 <span class="preprocessor"></span>
42
+ <a name="l00026"></a>00026 <span class="preprocessor">#include &lt;<a class="code" href="Platform_8hpp.html" title="Macros and utility functions to facilitate programming on all of Gosu&amp;#39;s supported...">Gosu/Platform.hpp</a>&gt;</span>
43
+ <a name="l00027"></a>00027 <span class="preprocessor">#include &lt;<a class="code" href="Fwd_8hpp.html" title="Contains declarations of all of Gosu&amp;#39;s available classes.">Gosu/Fwd.hpp</a>&gt;</span>
44
+ <a name="l00028"></a>00028 <span class="preprocessor">#include &lt;boost/function.hpp&gt;</span>
45
+ <a name="l00029"></a>00029 <span class="preprocessor">#include &lt;boost/scoped_ptr.hpp&gt;</span>
46
+ <a name="l00030"></a>00030
47
+ <a name="l00031"></a>00031 <span class="keyword">namespace </span>Gosu
48
+ <a name="l00032"></a>00032 {
49
+ <a name="l00034"></a><a class="code" href="classGosu_1_1Button.html">00034</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1Button.html" title="Very lightweight class that identifies a button (keyboard, mouse or other device)...">Button</a>
50
+ <a name="l00035"></a>00035 {
51
+ <a name="l00036"></a>00036 <span class="keywordtype">unsigned</span> id;
52
+ <a name="l00037"></a>00037
53
+ <a name="l00038"></a>00038 <span class="keyword">public</span>:
54
+ <a name="l00040"></a><a class="code" href="classGosu_1_1Button.html#e32f254fdf87bd98cfaa2c1be62e5600">00040</a> <span class="keyword">explicit</span> <a class="code" href="classGosu_1_1Button.html#0277cb92caff494eb2b568101ada4254" title="Default constructor; == noButton.">Button</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">id</span>) : id(id) {}
55
+ <a name="l00042"></a><a class="code" href="classGosu_1_1Button.html#b4427dd79ad56325fc5d0509b7ddaed2">00042</a> <span class="keywordtype">unsigned</span> <a class="code" href="classGosu_1_1Button.html#b4427dd79ad56325fc5d0509b7ddaed2" title="For internal use.">getId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> id; }
56
+ <a name="l00043"></a>00043
57
+ <a name="l00045"></a><a class="code" href="classGosu_1_1Button.html#0277cb92caff494eb2b568101ada4254">00045</a> <a class="code" href="classGosu_1_1Button.html#0277cb92caff494eb2b568101ada4254" title="Default constructor; == noButton.">Button</a>() : id(noButton) {}
58
+ <a name="l00046"></a>00046
59
+ <a name="l00048"></a><a class="code" href="classGosu_1_1Button.html#b0d53d357fa263d676d803c6c6baf843">00048</a> <a class="code" href="classGosu_1_1Button.html#0277cb92caff494eb2b568101ada4254" title="Default constructor; == noButton.">Button</a>(<a class="code" href="namespaceGosu.html#b085b2dbdd533b49dadaf217dbcf8368" title="List of all the button ids that can be used with Gosu::Input.">ButtonName</a> name) : id(name) {}
60
+ <a name="l00049"></a>00049 };
61
+ <a name="l00050"></a>00050
62
+ <a name="l00052"></a><a class="code" href="namespaceGosu.html#8abc916db977614382f04aef415c21c3">00052</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(<a class="code" href="classGosu_1_1Button.html" title="Very lightweight class that identifies a button (keyboard, mouse or other device)...">Button</a> lhs, <a class="code" href="classGosu_1_1Button.html" title="Very lightweight class that identifies a button (keyboard, mouse or other device)...">Button</a> rhs)
63
+ <a name="l00053"></a>00053 {
64
+ <a name="l00054"></a>00054 <span class="keywordflow">return</span> lhs.<a class="code" href="classGosu_1_1Button.html#b4427dd79ad56325fc5d0509b7ddaed2" title="For internal use.">getId</a>() == rhs.<a class="code" href="classGosu_1_1Button.html#b4427dd79ad56325fc5d0509b7ddaed2" title="For internal use.">getId</a>();
65
+ <a name="l00055"></a>00055 }
66
+ <a name="l00056"></a>00056 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(Button lhs, Button rhs)
67
+ <a name="l00057"></a>00057 {
68
+ <a name="l00058"></a>00058 <span class="keywordflow">return</span> !(lhs == rhs);
69
+ <a name="l00059"></a>00059 }
70
+ <a name="l00060"></a>00060
71
+ <a name="l00064"></a><a class="code" href="classGosu_1_1Input.html">00064</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1Input.html" title="Manages initialization and shutdown of the input system; only one Input instance...">Input</a>
72
+ <a name="l00065"></a>00065 {
73
+ <a name="l00066"></a>00066 <span class="keyword">struct </span>Impl;
74
+ <a name="l00067"></a>00067 boost::scoped_ptr&lt;Impl&gt; pimpl;
75
+ <a name="l00068"></a>00068
76
+ <a name="l00069"></a>00069 <span class="keyword">public</span>:
77
+ <a name="l00070"></a>00070 <span class="preprocessor"> #ifdef GOSU_IS_WIN</span>
78
+ <a name="l00071"></a>00071 <span class="preprocessor"></span> <a class="code" href="classGosu_1_1Input.html" title="Manages initialization and shutdown of the input system; only one Input instance...">Input</a>(HWND window);
79
+ <a name="l00072"></a>00072 <span class="preprocessor"> #endif</span>
80
+ <a name="l00073"></a>00073 <span class="preprocessor"></span>
81
+ <a name="l00074"></a>00074 <span class="preprocessor"> #ifdef GOSU_IS_MAC</span>
82
+ <a name="l00075"></a>00075 <span class="preprocessor"></span> <a class="code" href="classGosu_1_1Input.html" title="Manages initialization and shutdown of the input system; only one Input instance...">Input</a>(<span class="keywordtype">void</span>* nswindow);
83
+ <a name="l00076"></a>00076 <span class="keywordtype">bool</span> feedNSEvent(<span class="keywordtype">void</span>* event);
84
+ <a name="l00077"></a>00077 <span class="preprocessor"> #endif</span>
85
+ <a name="l00078"></a>00078 <span class="preprocessor"></span>
86
+ <a name="l00079"></a>00079 <span class="preprocessor"> #ifdef GOSU_IS_X</span>
87
+ <a name="l00080"></a>00080 <span class="preprocessor"></span> <a class="code" href="classGosu_1_1Input.html" title="Manages initialization and shutdown of the input system; only one Input instance...">Input</a>(::Display* dpy);
88
+ <a name="l00081"></a>00081 <span class="keywordtype">bool</span> feedXEvent(::XEvent&amp; event, <a class="code" href="classGosu_1_1Window.html" title="Convenient all-in-one class that serves as the foundation of a standard Gosu application...">Window</a>* window);
89
+ <a name="l00082"></a>00082 <span class="preprocessor"> #endif</span>
90
+ <a name="l00083"></a>00083 <span class="preprocessor"></span>
91
+ <a name="l00084"></a>00084 ~<a class="code" href="classGosu_1_1Input.html" title="Manages initialization and shutdown of the input system; only one Input instance...">Input</a>();
92
+ <a name="l00085"></a>00085
93
+ <a name="l00087"></a>00087 <span class="keyword">static</span> <span class="keywordtype">wchar_t</span> <a class="code" href="classGosu_1_1Input.html#fc9e732c19055c9f80afb147eac8414b" title="Returns the character a button usually produces, or 0.">idToChar</a>(<a class="code" href="classGosu_1_1Button.html" title="Very lightweight class that identifies a button (keyboard, mouse or other device)...">Button</a> btn);
94
+ <a name="l00090"></a>00090 <span class="keyword">static</span> <a class="code" href="classGosu_1_1Button.html" title="Very lightweight class that identifies a button (keyboard, mouse or other device)...">Button</a> <a class="code" href="classGosu_1_1Input.html#1cb42fd48c134fac5c2c8496b1e9f05a" title="Returns the button that has to be pressed to produce the given character, or noButton...">charToId</a>(<span class="keywordtype">wchar_t</span> ch);
95
+ <a name="l00091"></a>00091
96
+ <a name="l00093"></a>00093 <span class="keywordtype">bool</span> <a class="code" href="classGosu_1_1Input.html#b4645c1bf26bceea7f8cfc43680667f1" title="Returns true if a button is currently pressed.">down</a>(<a class="code" href="classGosu_1_1Button.html" title="Very lightweight class that identifies a button (keyboard, mouse or other device)...">Button</a> btn) <span class="keyword">const</span>;
97
+ <a name="l00094"></a>00094
98
+ <a name="l00097"></a>00097 <span class="keywordtype">double</span> <a class="code" href="classGosu_1_1Input.html#6849d640adfe2d576431ab2551c105c1" title="Returns the horizontal position of the mouse relative to the top left corner of the...">mouseX</a>() <span class="keyword">const</span>;
99
+ <a name="l00099"></a>00099 <span class="keywordtype">double</span> <a class="code" href="classGosu_1_1Input.html#5bedd5d599dfe530043b3b0f6e3bf2a4" title="See mouseX.">mouseY</a>() <span class="keyword">const</span>;
100
+ <a name="l00100"></a>00100 <span class="comment">// Undocumented for the moment.</span>
101
+ <a name="l00101"></a>00101 <span class="keywordtype">void</span> setMouseFactors(<span class="keywordtype">double</span> factorX, <span class="keywordtype">double</span> factorY);
102
+ <a name="l00102"></a>00102
103
+ <a name="l00105"></a>00105 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Input.html#904cd360ad96838a61b408d5aa6729aa" title="Collects new information about which buttons are pressed, where the mouse is and...">update</a>();
104
+ <a name="l00106"></a>00106
105
+ <a name="l00109"></a><a class="code" href="classGosu_1_1Input.html#b8ea5dbbd08d812cb8d5efa399750e77">00109</a> boost::function&lt;void (Button)&gt; <a class="code" href="classGosu_1_1Input.html#b8ea5dbbd08d812cb8d5efa399750e77" title="Assignable events that are called by update.">onButtonDown</a>, onButtonUp;
106
+ <a name="l00110"></a>00110
107
+ <a name="l00111"></a>00111 <a class="code" href="classGosu_1_1TextInput.html" title="TextInput instances are invisible objects that build a text string from input, using...">TextInput</a>* textInput() <span class="keyword">const</span>;
108
+ <a name="l00112"></a>00112 <span class="keywordtype">void</span> setTextInput(<a class="code" href="classGosu_1_1TextInput.html" title="TextInput instances are invisible objects that build a text string from input, using...">TextInput</a>* input);
109
+ <a name="l00113"></a>00113 };
110
+ <a name="l00114"></a>00114 }
111
+ <a name="l00115"></a>00115
112
+ <a name="l00116"></a>00116 <span class="preprocessor">#endif</span>
113
+ </pre></div></div>
114
+ <hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by&nbsp;
115
+ <a href="http://www.doxygen.org/index.html">
116
+ <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
117
+ </body>
118
+ </html>