#

API Documentation for: NEXT
Show: Inherited Protected Private Deprecated

# Graphics.Fill Class

Defined in: `Graphics.Fill:1484`
Module: EaselJS

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

## Constructor

### `Graphics.Fill`

(

- `style`
- `matrix`

)

Defined in `Graphics.Fill:1484`

#### Parameters:

- `style` Object

  A valid Context2D fillStyle.

- `matrix` Matrix2D

- Index
- Methods
- Properties

## Item Index

### Methods

- bitmap
- linearGradient
- radialGradient

### Properties

- matrix
- style

## Methods

### `bitmap`

(

- `image`
- `[repetition]`

)
Fill

Defined in `bitmap:1545`

Creates a bitmap fill style and assigns it to Fill/style:property.

#### Parameters:

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

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

#### Returns:

Fill:

Returns this Fill object for chaining or assignment.

### `linearGradient`

(

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

)
Fill

Defined in `linearGradient:1511`

Creates a linear gradient style and assigns it to Fill/style:property.

#### Parameters:

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

#### Returns:

Fill:

Returns this Fill object for chaining or assignment.

### `radialGradient`

(

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

)
Fill

Defined in `radialGradient:1527`

Creates a radial gradient style and assigns it to Fill/style:property.

#### Parameters:

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

#### Returns:

Fill:

Returns this Fill object for chaining or assignment.

## Properties

### `matrix`

Matrix2D

Defined in `matrix:1496`

### `style`

Object

Defined in `style:1491`

A valid Context2D fillStyle.