1
0
Fork 0
freesewing/sites/dev/docs/reference/api/point
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
..
addcircle 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
angle 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
clone fix(reference:api): Revert incorrect Example formatting (#367) 2025-05-19 08:04:05 +02:00
copy chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
dist [breaking]: FreeSewing v4 (#7297) 2025-04-01 16:15:20 +02:00
dx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
dy chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
flipx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
flipy 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
setcircle 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
shift chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
shiftfractiontowards chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
shiftoutwards chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
shifttowards chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
sitson chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
sitsroughlyon chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
slope chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
translate chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00
readme.mdx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00

---
title: Point
---

A Point object represents a point on a 2D plane with an X and Y axis.

## Signature

```js
Point new Point(Number x, Number y)
```

The point constructor takes two arguments:

- `x` : The X-coordinate of the point
- `y` : The Y-coordinate of the point

## Properties

Point objects come with the following properties:

- `x` : The X-coordinate of the point
- `y` : The Y-coordinate of the point
- `attributes` : An [Attributes](/reference/api/attributes) instance holding the point's attributes

:::note RELATED
See [Using Attributes](/howtos/code/attributes)
for information about custom Attributes that can be used with Points.
:::

## Example

<Example caption="Example of the Point constructor">
```js
({ Point, points, part }) => {
  points.example = new Point(0,0)
    .addCircle(10)

  return part
}
```
</Example>

## Methods

A Point object exposes the following methods:

<ReadMore />