Class: VectorSalad::StandardShapes::Exclusion

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

Overview

Exclude the contained shapes.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

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

The first path is used as the subject, subsequent paths are excluded from the first.

Examples:

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

Using DSL:

exclusion 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/exclusion.rb', line 21

def initialize(**options, &block)
  super(:xor, **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