class Fox::Canvas::ShapeGroup
Public Class Methods
new()
click to toggle source
Initialize this shape group
# File lib/fox16/canvas.rb, line 143 def initialize @shapes = [] end
Public Instance Methods
addShape(shape)
click to toggle source
Add a shape to this group
# File lib/fox16/canvas.rb, line 153 def addShape(shape) @shapes << shape end
each() { |shape| ... }
click to toggle source
# File lib/fox16/canvas.rb, line 162 def each @shapes.each { |shape| yield shape } end
include?(shape)
click to toggle source
Does the group contain this shape?
# File lib/fox16/canvas.rb, line 148 def include?(shape) @shapes.include?(shape) end
removeShape(shape)
click to toggle source
Remove a shape from this group
# File lib/fox16/canvas.rb, line 158 def removeShape(shape) @shapes.remove(shape) end
reverse_each() { |shape| ... }
click to toggle source
# File lib/fox16/canvas.rb, line 166 def reverse_each @shapes.reverse_each { |shape| yield shape } end