class Fox::Canvas::ImageShape
Attributes
image[RW]
Public Class Methods
new(x, y, image)
click to toggle source
Calls superclass method
Fox::Canvas::Shape::new
# File lib/fox16/canvas.rb, line 311 def initialize(x, y, image) super(x, y) @image = image end
Public Instance Methods
draw(dc)
click to toggle source
# File lib/fox16/canvas.rb, line 324 def draw(dc) apply_dc(dc) do if selected? dc.lineWidth = 5 dc.drawRectangle(x - 3, y - 3, width + 5, height + 5) end dc.drawImage(image, x, y) end end
height()
click to toggle source
# File lib/fox16/canvas.rb, line 320 def height @image.height end
width()
click to toggle source
# File lib/fox16/canvas.rb, line 316 def width @image.width end