1
0
Fork 0
freesewing/sites/dev/docs/reference/api/path
Benjamin Fan d6a1ea81db fix(reference:macros): Fix typo in Examples (#368)
(A few similar typo fixes to Core API docs were made in #367.)

Co-authored-by: Benjamin Fan <ben-git@swinglonga.com>
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/368
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
Co-committed-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
2025-05-19 08:04:38 +02:00
..
addclass
addtext
angleat
aspathstring
asrenderprops
attr
bbox
circlesegment
clean
clone
close
combine
curve
curve_
divide
edge
end
hide
insop
intersects
intersectsbeam
intersectsx
intersectsy
join
length
line
move
noop
offset
reverse
rotate
roughlength
setclass
sethidden
settext
shiftalong
shiftfractionalong
smurve
smurve_
split
start
translate
trim
ucurve
unhide
readme.mdx

---
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 />