class Fox::Canvas::CircleShape
Attributes
radius[RW]
Public Class Methods
new(x, y, radius)
click to toggle source
Calls superclass method
Fox::Canvas::Shape.new
# File lib/fox16/canvas.rb, line 263 def initialize(x, y, radius) super(x, y) @radius = radius end
Public Instance Methods
draw(dc)
click to toggle source
# File lib/fox16/canvas.rb, line 276 def draw(dc) oldForeground = dc.foreground oldLineWidth = dc.lineWidth dc.foreground = foreground dc.lineWidth = 5 if selected? dc.drawArc(x, y, width, height, 0, 64*180) dc.drawArc(x, y, width, height, 64*180, 64*360) dc.foreground = oldForeground dc.lineWidth = oldLineWidth end
height()
click to toggle source
# File lib/fox16/canvas.rb, line 272 def height 2*radius end
width()
click to toggle source
# File lib/fox16/canvas.rb, line 268 def width 2*radius end