矩阵变色滤镜

class

  ColorMatrixFilter

since

  1.0.0

### Hierarchy

- ColorMatrixFilter

## Index

### Constructors

- constructor

### Properties

- brightness
- colorMatrix
- contrast
- hue
- saturation
- type
- DELTA_INDEX

### Methods

- _cleanValue
- _multiplyMatrix
- destroy
- drawFilter
- toString

## Constructors

### constructor

- new ColorMatrixFilter(brightness: number, contrast: number, saturation: number, hue: number): ColorMatrixFilter

- - Defined in filter/Filters.ts:275
  method

    ColorMatrixFilter

  since

    1.0.0

  #### Parameters

  - ##### brightness: number

  - ##### contrast: number

  - ##### saturation: number

  - ##### hue: number

  #### Returns ColorMatrixFilter

## Properties

### brightness

brightness: number = 0

- Defined in filter/Filters.ts:241

property

  brightness

readonly
since

  1.0.0

type

  {number}

### Private colorMatrix

colorMatrix: any

- Defined in filter/Filters.ts:275

### contrast

contrast: number = 0

- Defined in filter/Filters.ts:249

property

  contrast

readonly
since

  1.0.0

type

  {number}

### hue

hue: number = 0

- Defined in filter/Filters.ts:265

property

  hue

readonly
since

  1.0.0

type

  {number}

### saturation

saturation: number = 0

- Defined in filter/Filters.ts:257

property

  saturation

readonly
since

  1.0.0

type

  {number}

### type

type: string = "ColorMatrix"

- Defined in filter/Filters.ts:274

滤镜类型 只读

property

  type

readonly
since

  1.0.0

type

  {string}

### Static DELTA_INDEX

DELTA_INDEX: number[] = [0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68,0.71, 0.74, 0.77, 0.80, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98,1.0, 1.06, 1.12, 1.18, 1.24, 1.30, 1.36, 1.42, 1.48, 1.54,1.60, 1.66, 1.72, 1.78, 1.84, 1.90, 1.96, 2.0, 2.12, 2.25,2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8,4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0,7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8,10.0]

- Defined in filter/Filters.ts:392

## Methods

### Private _cleanValue

- _cleanValue(value: number, limit: number): number

- - Defined in filter/Filters.ts:420

  #### Parameters

  - ##### value: number

  - ##### limit: number

  #### Returns number

### Private _multiplyMatrix

- _multiplyMatrix(colorMat: any): void

- - Defined in filter/Filters.ts:405

  #### Parameters

  - ##### colorMat: any

  #### Returns void

### destroy

- destroy(): void

- - Defined in filter/Filters.ts:435

  #### Returns void

### drawFilter

- drawFilter(imageData?: ImageData): void

- - Defined in filter/Filters.ts:371

  绘画滤镜效果

  method

    drawFilter

  since

    1.0.0

  #### Parameters

  - ##### Default value imageData: ImageData = null

  #### Returns void

### toString

- toString(): string

- - Defined in filter/Filters.ts:430

  获取滤镜的字符串表现形式以方便比较两个滤镜是否效果一样

  method

    toString

  since

    1.0.0

  #### Returns string

Generated using TypeDoc