Class: VectorSalad::StandardShapes::Difference

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

Instance Attribute Summary

Attributes inherited from BasicShape

#options

Instance Method Summary collapse

Methods inherited from Clip

#canvas, #to_path

Methods included from DSL

#method_missing

Constructor Details

#initialize(**options, &block) ⇒ Difference

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

Examples:

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

# Using DSL: difference do path([0,0], [90,90], [0,90]) path([50,0], [95,0], [50, 70]) end



23
24
25
# File 'lib/vector_salad/standard_shapes/difference.rb', line 23

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

Dynamic Method Handling

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