1
0
Fork 0
freesewing/sites/dev/docs/reference/api/path/readme.mdx
Joost De Cock ab3204f9f1 chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus
setup. It's part of my efforts to simplify FreeSewing's setup so we can
focus on our core value proposition.
2024-09-28 13:13:48 +02:00

50 lines
1.1 KiB
Text

---
title: Path
---
A path represents an SVG path, which are the lines and curves on our pattern.
## Signature
```js
Path new Path()
```
The Path constructor takes no arguments.
## Properties
A Path object comes with the following properties:
- `attributes` : An [Attributes](/reference/api/attributes) instance holding
the path's attributes
- `hidden` : When this is `true` the path will be hidden (excluding it from the
output). See [Path.hide()](/reference/api/path/hide),
[Path.unhide()](/reference/api/path/unhide), and
[Path.setHidden()](/reference/api/path/sethidden) for various methods that
allow setting this in a chainable way.
:::note RELATED
See [Using Attributes](/howtos/code/attributes)
for information about custom Attributes that can be used with Paths.
:::
## Example
<Example caption="Example of the Path contructor">
```js
({ Point, points, Path, paths, part }) => {
paths.example = new Path()
.move(new Point(0,0))
.line(new Point(100,0))
return part
}
```
</Example>
## Methods
A Path object exposes the following methods:
<ReadMore />