#

API Documentation for: NEXT
Show: Inherited Protected Private Deprecated

# Graphics.Stroke Class

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

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

## Constructor

### `Graphics.Stroke`

(

- `style`
- `ignoreScale`

)

Defined in `Graphics.Stroke:1986`

#### 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:2046`

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:2002`

Execute the Graphics command in the provided Canvas context.

#### Parameters:

- `ctx` CanvasRenderingContext2D

  The canvas rendering context

### `linearGradient`

(

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

)
Fill

Defined in `linearGradient:2018`

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:2031`

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:1998`

### `style`

Object

Defined in `style:1993`

A valid Context2D strokeStyle.