Class: VectorSalad::StandardShapes::BasicShape

Inherits:
Object
  • Object
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.

Direct Known Subclasses

Circle, Clip, Custom, Heart, IsoTri, MultiPath, Oval, Path, Polygon, Rect

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject

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

#flipObject

See Also:



23
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 23

def_instance_delegator :to_path, :flip

#flip_xObject

See Also:



24
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 24

def_instance_delegator :to_path, :flip_x

#flip_yObject

See Also:



25
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 25

def_instance_delegator :to_path, :flip_y

#jitterObject

See Also:



29
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 29

def_instance_delegator :to_path, :jitter

#moveObject

See Also:



28
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 28

def_instance_delegator :to_path, :move

#rotateObject

See Also:



26
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 26

def_instance_delegator :to_path, :rotate

#scaleObject

See Also:



30
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 30

def_instance_delegator :to_path, :scale

#to_aObject

See Also:



35
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 35

def_instance_delegator :to_path, :to_a

#to_bezier_pathObject



32
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 32

def_instance_delegator :to_path, :to_bezier_path

#to_cubic_pathObject

See Also:



33
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 33

def_instance_delegator :to_path, :to_cubic_path

#to_multi_pathObject

See Also:



34
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 34

def_instance_delegator :to_path, :to_multi_path

#to_path(: []) ⇒ Object

See Also:

  • Path#:[]


27
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 27

def_instance_delegator :to_path, :[]

#to_simple_pathObject



31
# File 'lib/vector_salad/standard_shapes/basic_shape.rb', line 31

def_instance_delegator :to_path, :to_simple_path

#to_svgObject

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