#

API Documentation for: NEXT
Show: Inherited Protected Private Deprecated

# Graphics.Stroke Class

Defined in: `Graphics.Stroke:1992`
Module: EaselJS

Graphics command object. See beginStroke and append for more information.

## Constructor

### `Graphics.Stroke`

(

- `style`
- `ignoreScale`

)

Defined in `Graphics.Stroke:1992`

#### Parameters:

- `style` Object

  A valid Context2D fillStyle.

- `ignoreScale` Boolean

- Index
- Methods
- Properties

## Item Index

### Methods

- bitmap
- exec
- linearGradient
- radialGradient

### Properties

- ignoreScale
- style

## Methods

### `bitmap`

(

- `image`
- `[repetition]`

)
Fill

Defined in `bitmap:2051`

Creates a bitmap fill style and assigns it to Stroke/style:property. See beginBitmapStroke for more information.

#### Parameters:

- `image` HTMLImageElement
- `[repetition]` String optional

  One of: repeat, repeat-x, repeat-y, or no-repeat.

#### Returns:

Fill:

Returns this Stroke object for chaining or assignment.

### `exec`

(

- `ctx`

)

Defined in `exec:2008`

#### Parameters:

- `ctx` CanvasRenderingContext2D

### `linearGradient`

(

- `colors`
- `ratios`
- `x0`
- `y0`
- `x1`
- `y1`

)
Fill

Defined in `linearGradient:2023`

Creates a linear gradient style and assigns it to Stroke/style:property. See beginLinearGradientStroke for more information.

#### Parameters:

- `colors` Array
- `ratios` Array
- `x0` Number
- `y0` Number
- `x1` Number
- `y1` Number

#### Returns:

Fill:

Returns this Stroke object for chaining or assignment.

### `radialGradient`

(

- `colors`
- `ratios`
- `x0`
- `y0`
- `r0`
- `x1`
- `y1`
- `r1`

)
Fill

Defined in `radialGradient:2036`

Creates a radial gradient style and assigns it to Stroke/style:property. See beginRadialGradientStroke for more information.

#### Parameters:

- `colors` Array
- `ratios` Array
- `x0` Number
- `y0` Number
- `r0` Number
- `x1` Number
- `y1` Number
- `r1` Number

#### Returns:

Fill:

Returns this Stroke object for chaining or assignment.

## Properties

### `ignoreScale`

Boolean

Defined in `ignoreScale:2004`

### `style`

Object

Defined in `style:1999`

A valid Context2D strokeStyle.