Skip to content
bggd edited this page Nov 25, 2013 · 10 revisions
# Class Methods

Image.new(width, height, color = Color.rgb)

Image.load(filepath)

Image.target(img) do
 # drawing stuff
end

Image.hold_drawing(bool)

Image.hold_drawing?

# Instance Attributes

img = Image.load("hero.png")

img.w
img.h

# Instance Methods

# angle - 0..360
img.draw(x, y, angle:0, color:Color.rgb(), scale:[1.0, 1.0], anchor:[0.0, 0.0], pivot:[0.5, 0.5], flip:[false, false])

img.sub_image(x = 0, y = 0, width = img.w, height = img.h)

img.clear(color = Color.rgb())
Clone this wiki locally