Class: VectorSalad::StandardShapes::Intersection

Inherits:
Clip show all
Defined in:
lib/vector_salad/standard_shapes/intersection.rb

Overview

Intersect the contained shapes.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Intersection) initialize(**options, &block)

The first path is used as the subject, subsequent paths are intersected with the first.

Examples:

Intersection.new do
  canvas << Path.new([0,0], [90,90], [0,90])
  canvas << Path.new([50,0], [95,0], [50, 70])
end

Using DSL:

intersection do
  path([0,0], [90,90], [0,90])
  path([50,0], [95,0], [50, 70])
end


21
22
23
# File 'lib/vector_salad/standard_shapes/intersection.rb', line 21

def initialize(**options, &block)
  super(:intersection, **options, &block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class VectorSalad::DSL

Instance Attribute Details

- (Object) options Originally defined in class BasicShape

Returns the value of attribute options