1
0
Fork 0
freesewing/sites/dev/docs/reference/api/path
Benjamin Fan ed8a166ea9 fix(reference:api): Revert incorrect Example formatting (#367)
This PR reverts the incorrect lint/prettier changes applied to <Example> code in the reference Core API docs l by the husky pre-commit hook, the problem mentioned in Issue #333.

(These are just the changes for the Core API docs. Additional PRs will be filed for changes in the other reference, howtos, and guides documentation.)

Co-authored-by: Benjamin Fan <ben-git@swinglonga.com>
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/367
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:05 +02:00
..
addclass fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
addtext fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
angleat fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
aspathstring chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
asrenderprops chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
attr fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
bbox chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
circlesegment fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
clean chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
clone chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
close fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
combine chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
curve fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
curve_ fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
divide chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
edge chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
end fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
hide fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
insop fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
intersects Fix and improve path intersection methods 2024-10-03 11:37:55 +02:00
intersectsbeam Fix and improve path intersection methods 2024-10-03 11:37:55 +02:00
intersectsx Fix and improve path intersection methods 2024-10-03 11:37:55 +02:00
intersectsy Fix and improve path intersection methods 2024-10-03 11:37:55 +02:00
join chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
length chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
line fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
move chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
noop fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
offset chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
reverse chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
rotate chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
roughlength chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
setclass fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
sethidden fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
settext fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
shiftalong chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
shiftfractionalong chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
smurve fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
smurve_ fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
split chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
start fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
translate chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
trim chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
ucurve fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
unhide fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
readme.mdx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00

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