class Fox::Canvas::ShapeGroup

Public Class Methods

new() click to toggle source

Initialize this shape group

# File lib/fox16/canvas.rb, line 150
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 160
def addShape(shape)
  @shapes << shape
end
each() { |shape| ... } click to toggle source
# File lib/fox16/canvas.rb, line 169
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 155
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 165
def removeShape(shape)
  @shapes.remove(shape)
end
reverse_each() { |shape| ... } click to toggle source
# File lib/fox16/canvas.rb, line 173
def reverse_each
  @shapes.reverse_each { |shape| yield shape }
end