Skip to content

Instantly share code, notes, and snippets.

@Spooner Spooner/gist:537441
Created Aug 19, 2010

Embed
What would you like to do?
Gosu::Image::as_devil
# Gosu::Image::as_devil (including workaround for Gosu to_blob colour shift bug)
module Gosu
class Image
def as_devil
raise ArgumentError, "Must provide a block" unless block_given?
devil_image = Devil.from_blob(Image.from_blob(to_blob, width, height).to_blob, width, height)
yield devil_image
gosu_image = devil_image.to_gosu $window
devil_image.delete
gosu_image
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.