class Fox::Canvas::ShapeGroup
Public Class Methods
Source
# File lib/fox16/canvas.rb, line 150 def initialize @shapes = [] end
Initialize this shape group
Public Instance Methods
Source
# File lib/fox16/canvas.rb, line 160 def addShape(shape) @shapes << shape end
Add a shape to this group
Source
# File lib/fox16/canvas.rb, line 169 def each @shapes.each { |shape| yield shape } end
Source
# File lib/fox16/canvas.rb, line 155 def include?(shape) @shapes.include?(shape) end
Does the group contain this shape?
Source
# File lib/fox16/canvas.rb, line 165 def removeShape(shape) @shapes.remove(shape) end
Remove a shape from this group
Source
# File lib/fox16/canvas.rb, line 173 def reverse_each @shapes.reverse_each { |shape| yield shape } end