A path represents an SVG path, which are the lines and curves on our pattern.
Signature
Javascript
Path new Path()
The Path constructor takes no arguments.
Properties
A Path object comes with the following properties:
attributes
: An Attributes instance holding the path’s attributeshidden
: When this istrue
the path will be hidden (excluding it from the output). See Path.hide(), Path.unhide(), and Path.setHidden() for various methods that allow setting this in a chainable way.
RELATED
See Using Attributes for information about custom Attributes that can be used with Paths.
Example
Methods
A Path object exposes the following methods:
- Path._curve()
- Path.addClass()
- Path.addText()
- Path.asPathString()
- Path.asRenderProps()
- Path.attr()
- Path.bbox()
- Path.clean()
- Path.clone()
- Path.close()
- Path.combine()
- Path.curve()
- Path.curve_()
- Path.divide()
- Path.edge()
- Path.end()
- Path.hide()
- Path.insop()
- Path.intersects()
- Path.intersectsX()
- Path.intersectsY()
- Path.join()
- Path.length()
- Path.line()
- Path.move()
- Path.noop()
- Path.offset()
- Path.reverse()
- Path.rotate()
- Path.roughLength()
- Path.setClass()
- Path.setHidden()
- Path.setText()
- Path.shiftAlong()
- Path.shiftFractionAlong()
- Path.smurve()
- Path.smurve_()
- Path.split()
- Path.start()
- Path.translate()
- Path.trim()
- Path.unhide()