Class: VectorSalad::StandardShapes::Difference
- Inherits:
-
Clip
- Object
- BasicShape
- Clip
- VectorSalad::StandardShapes::Difference
- Defined in:
- lib/vector_salad/standard_shapes/difference.rb
Instance Attribute Summary
Attributes inherited from BasicShape
Instance Method Summary collapse
-
#initialize(**options, &block) ⇒ Difference
constructor
Subtract paths.
Methods inherited from Clip
Methods included from DSL
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(**, &block) super(:difference, **, &block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class VectorSalad::DSL