class Fox::Canvas::RectangleShape

Attributes

height[RW]
width[RW]

Public Class Methods

new(x, y, w, h) click to toggle source
Calls superclass method Fox::Canvas::Shape::new
# File lib/fox16/canvas.rb, line 230
def initialize(x, y, w, h)
  super(x, y)
  @width = w
  @height = h
end

Public Instance Methods

draw(dc) click to toggle source
# File lib/fox16/canvas.rb, line 236
def draw(dc)
  apply_dc(dc) do
    dc.lineWidth = 5 if selected?
    dc.drawRectangle(x, y, width, height)
  end
end