Class: VectorSalad::StandardShapes::BasicShape
- Inherits:
-
Object
- Object
- VectorSalad::StandardShapes::BasicShape
show all
- Extended by:
- Forwardable
- Defined in:
- lib/vector_salad/standard_shapes/basic_shape.rb,
lib/vector_salad/exporters/svg_exporter.rb
Overview
All shapes must inherit from BasicShape,
with the exception of N node.
It alows many usefulmethods in Path to be called on the shape
by delegating them, so see Path for more information on all the
methods that shapes can use.
You can't use BasicShape directly.
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
18
19
20
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 18
def options
@options
end
|
Instance Method Details
#flip ⇒ Object
23
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 23
def_instance_delegator :to_path, :flip
|
#flip_x ⇒ Object
24
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 24
def_instance_delegator :to_path, :flip_x
|
#flip_y ⇒ Object
25
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 25
def_instance_delegator :to_path, :flip_y
|
#jitter ⇒ Object
29
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 29
def_instance_delegator :to_path, :jitter
|
#move ⇒ Object
28
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 28
def_instance_delegator :to_path, :move
|
#rotate ⇒ Object
26
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 26
def_instance_delegator :to_path, :rotate
|
#scale ⇒ Object
30
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 30
def_instance_delegator :to_path, :scale
|
#to_a ⇒ Object
35
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 35
def_instance_delegator :to_path, :to_a
|
#to_bezier_path ⇒ Object
32
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 32
def_instance_delegator :to_path, :to_bezier_path
|
#to_cubic_path ⇒ Object
33
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 33
def_instance_delegator :to_path, :to_cubic_path
|
#to_multi_path ⇒ Object
34
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 34
def_instance_delegator :to_path, :to_multi_path
|
#to_path(: []) ⇒ Object
27
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 27
def_instance_delegator :to_path, :[]
|
#to_simple_path ⇒ Object
31
|
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 31
def_instance_delegator :to_path, :to_simple_path
|
#to_svg ⇒ Object
Export the shape to an svg string
83
84
85
|
# File 'lib/vector_salad/exporters/svg_exporter.rb', line 83
def to_svg
to_path.to_svg
end
|