# Stroke

Defines a stroke style.

## Constructors

Stroke(color,hairline,width,alignment,cap,join,miterLimit)→[Stroke](https://cuttle.xyz/learn/reference/Stroke)

Constructs a stroke style.

`color`

`[Color](https://cuttle.xyz/learn/reference/Color)`

`hairline`

`boolean`

`true`

`width`

`number`

`0.1`

`alignment`

`("centered" | "inner" | "outer")`

`"centered"`

`cap`

`("butt" | "round" | "square")`

`"butt"`

`join`

`("miter" | "round" | "bevel")`

`"miter"`

`miterLimit`

`number`

`4`

## Properties

.color[Color](https://cuttle.xyz/learn/reference/Color)

The color of the stroke

.hairlineboolean

Hairline strokes represent a "very thin" stroke. They're usually used for cut or score lines. When exported, hairline strokes are converted to a stroke with a width defined in the project settings.

Note that when `hairline` is `true` the following stroke properties will have no effect.

.widthnumber

The width of the stroke

.alignment("centered" | "inner" | "outer")

The alignment of the stroke in relation to the inside or outside of the path. This property only affects closed paths.

.cap("butt" | "round" | "square")

The shape to use at the endpoints of open paths.

.join("miter" | "round" | "bevel")

The shape to use at the corners of the path.

.miterLimitnumber

When `join` is set to `"miter"`, this limits the ratio of the miter length to the stroke `width`. When the limit is exceeded, a `"bevel"` join will be used.

## Methods

.clone()→[Stroke](https://cuttle.xyz/learn/reference/Stroke)

Returns a copy of this stroke.

.equals(stroke)→boolean

`stroke`

`[Stroke](https://cuttle.xyz/learn/reference/Stroke)`

Another stroke to compare against.

Returns `true` if this stroke is equal to `stroke`, `false` otherwise.