Method: Gosu::Window#record
- Defined in:
- lib/gosu_android/main-window.rb
#record(width, height, &rendering_code) ⇒ Gosu::Image
Returns a Gosu::Image that containes everything rendered within the given block. It can be used to optimize rendering of many static images, e.g. the map. There are still several restrictions that you will be informed about via exceptions.
The returned Gosu::Image will have the width and height you pass as arguments, regardless of how the area you draw on. It is important to pass accurate values if you plan on using Gosu::Image#draw_as_quad or Gosu::Image#draw_rot with the result later.
280 |
# File 'lib/gosu_android/main-window.rb', line 280 def record(width, height, &rendering_code); end |