Class: VectorSalad::StandardShapes::Group
- Inherits:
-
BasicShape
- Object
- BasicShape
- VectorSalad::StandardShapes::Group
- Includes:
- Mixins::Transforms, VectorSalad::StandardShapes
- Defined in:
- lib/vector_salad/standard_shapes/group.rb
Overview
Group the contained shapes.
Instance Attribute Summary (collapse)
-
- (Object) canvas
Returns the value of attribute canvas.
-
- (Object) options
inherited
from BasicShape
Returns the value of attribute options.
Instance Method Summary (collapse)
-
- (Any) [](x, y)
included
from Mixins::Transforms
Move the shape absolutely.
-
- (Group) initialize(**_options, &block)
constructor
A new instance of Group.
-
- (Any) move(x, y)
included
from Mixins::Transforms
Move the shape relatively.
-
- (Any) rotate(angle)
included
from Mixins::Transforms
Rotates the shape by the specified angle about the origin.
-
- (Any) scale(multiplier)
included
from Mixins::Transforms
Scale a shape by multiplier about the origin.
-
- (Object) to_path
Returns self.
Constructor Details
- (Group) initialize(**_options, &block)
Returns a new instance of Group
15 16 17 |
# File 'lib/vector_salad/standard_shapes/group.rb', line 15 def initialize(**, &block) instance_eval(&block) if block # inner_canvas is populated end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class VectorSalad::DSL
Instance Attribute Details
- (Object) canvas
Returns the value of attribute canvas
13 14 15 |
# File 'lib/vector_salad/standard_shapes/group.rb', line 13 def canvas @canvas end |
- (Object) options Originally defined in class BasicShape
Returns the value of attribute options
Instance Method Details
- (Any) [](x, y) Originally defined in module Mixins::Transforms
Move the shape absolutely.
- (Any) move(x, y) Originally defined in module Mixins::Transforms
Move the shape relatively.
- (Any) rotate(angle) Originally defined in module Mixins::Transforms
Rotates the shape by the specified angle about the origin.
- (Any) scale(multiplier) Originally defined in module Mixins::Transforms
Scale a shape by multiplier about the origin.
- (Object) to_path
Returns self
24 25 26 |
# File 'lib/vector_salad/standard_shapes/group.rb', line 24 def to_path self end |