Class: Fox::Canvas::ImageShape
Instance Attribute Summary collapse
-
#image ⇒ Object
Returns the value of attribute image.
Attributes inherited from Shape
#foreground, #selector, #target, #x, #y
Instance Method Summary collapse
- #draw(dc) ⇒ Object
-
#initialize(x, y, image) ⇒ ImageShape
constructor
A new instance of ImageShape.
Methods inherited from Shape
#bounds, #deselect, #disable, #draggable=, #draggable?, #drawOutline, #enable, #enabled?, #hide, #hit?, #makeControlPoints, #move, #position, #resize, #select, #selected?, #show, #visible?
Constructor Details
#initialize(x, y, image) ⇒ ImageShape
Returns a new instance of ImageShape.
295 296 297 |
# File 'lib/fox16/canvas.rb', line 295 def initialize(x, y, image) @image = image end |
Instance Attribute Details
#image ⇒ Object
Returns the value of attribute image.
293 294 295 |
# File 'lib/fox16/canvas.rb', line 293 def image @image end |
Instance Method Details
#draw(dc) ⇒ Object
299 300 301 |
# File 'lib/fox16/canvas.rb', line 299 def draw(dc) dc.drawImage(image) end |