tldraw/apps/docs/content/gen/Polyline2d-class.mdx
alex c893a02878
remove lock option from highlighter (#1703)
Highlighter is autolocked, so we shouldn't show the lock icon 

### Change Type

- [x] `patch` — Bug fix


[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- We no longer show the tool lock option for highlighter - it didn't do
anything anyway
2023-07-04 10:41:14 +00:00

226 lines
2.8 KiB
Text

---
title: Polyline2d
status: published
category: primitives
group: Class
author: api
date: 06/23/2023
order: 70
---<Small>Public Class</Small>
<details>
<summary>Table of Contents</summary>
- [Properties](#properties)
- [segments](#Polyline2d-segments-member)
- [Methods](#methods)
- [FromPoints](#Polyline2d-FromPoints-member-1)
- [getSegmentsFromPoints](#Polyline2d-getSegmentsFromPoints-member-1)
</details>
##### Signature
```ts
class Polyline2d extends BaseSpline2d<LineSegment2dModel> {}
```
##### References
[LineSegment2dModel](/gen/primitives/LineSegment2dModel-interface)
---
### `Constructor`
<Small>Public Constructor</Small>
Constructs a new instance of the `Polyline2d` class
##### Parameters
<ParametersTable>
<ParametersTableRow>
<ParametersTableName>
`points`
</ParametersTableName>
<ParametersTableDescription>
```ts
VecLike[]
```
</ParametersTableDescription>
</ParametersTableRow>
<ParametersTableRow>
<ParametersTableName>
`k`
<Small>(optional)</Small>
</ParametersTableName>
<ParametersTableDescription>
```ts
number
```
</ParametersTableDescription>
</ParametersTableRow>
<ParametersTableRow>
<ParametersTableName>
`p`
<Small>(optional)</Small>
</ParametersTableName>
<ParametersTableDescription>
```ts
number
```
</ParametersTableDescription>
</ParametersTableRow>
</ParametersTable>
##### References
[VecLike](/gen/primitives/VecLike-type)
---
## Properties
### `segments` \{#Polyline2d-segments-member}
<Small>Public Property</Small>
##### Signature
```ts
segments: LineSegment2d[]
```
##### References
[LineSegment2d](/gen/primitives/LineSegment2d-class)
---
## Methods
### `FromPoints()` \{#Polyline2d-FromPoints-member-1}
<Small>Public Static Method</Small>
##### Parameters
<ParametersTable>
<ParametersTableRow>
<ParametersTableName>
`points`
</ParametersTableName>
<ParametersTableDescription>
```ts
VecLike[]
```
</ParametersTableDescription>
</ParametersTableRow>
</ParametersTable>
##### Returns
```ts
Polyline2d
```
##### References
[VecLike](/gen/primitives/VecLike-type), [Polyline2d](/gen/primitives/Polyline2d-class)
---
### `getSegmentsFromPoints()` \{#Polyline2d-getSegmentsFromPoints-member-1}
<Small>Public Method</Small>
##### Parameters
<ParametersTable>
<ParametersTableRow>
<ParametersTableName>
`points`
</ParametersTableName>
<ParametersTableDescription>
```ts
VecLike[]
```
</ParametersTableDescription>
</ParametersTableRow>
<ParametersTableRow>
<ParametersTableName>
`p`
<Small>(optional)</Small>
</ParametersTableName>
<ParametersTableDescription>
```ts
number
```
</ParametersTableDescription>
</ParametersTableRow>
</ParametersTable>
##### Returns
```ts
LineSegment2d[]
```
##### References
[VecLike](/gen/primitives/VecLike-type), [LineSegment2d](/gen/primitives/LineSegment2d-class)
---