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 224
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 230
def draw(dc)
  oldForeground = dc.foreground
  dc.foreground = foreground
  dc.drawRectangle(x, y, width, height)
  dc.foreground = oldForeground
end