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 280 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 293 def draw(dc) apply_dc(dc) do oldLineWidth = dc.lineWidth 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.lineWidth = oldLineWidth end end
height()
click to toggle source
# File lib/fox16/canvas.rb, line 289 def height 2*radius end
width()
click to toggle source
# File lib/fox16/canvas.rb, line 285 def width 2*radius end