Class: Ashton::PixelCache
- Inherits:
-
Object
- Object
- Ashton::PixelCache
- Defined in:
- lib/ashton/pixel_cache.rb
Instance Method Summary collapse
-
#to_image(options = {}) ⇒ Object
Convert the current contents of the cache into a Gosu::Image.
Instance Method Details
#to_image(options = {}) ⇒ Object
Convert the current contents of the cache into a Gosu::Image
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ashton/pixel_cache.rb', line 10 def to_image( = {}) = { tileable: false, }.merge! # Create a new Image from the flipped pixel data. stub = ImageStub.new to_blob, width, height if defined? TexPlay Gosu::Image.new $window, stub, [:tileable], else Gosu::Image.new $window, stub, [:tileable] end end |