| Flutter Impeller |

Public Attributes | List of all members
impeller::ColorMatrix Struct Reference

`#include <color.h>`

## Public Attributes
Scalar | array [20]

## Detailed Description

4x5 matrix for transforming the color and alpha components of a Bitmap.

[ a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t ]

When applied to a color [R, G, B, A], the resulting color is computed as:

R’ = a*R + b*G + c*B + d*A + e; G’ = f*R + g*G + h*B + i*A + j; B’ = k*R + l*G + m*B + n*A + o; A’ = p*R + q*G + r*B + s*A + t;

That resulting color [R’, G’, B’, A’] then has each channel clamped to the 0 to 1 range.

Definition at line 117 of file color.h.

## Member Data Documentation

## ◆ array

Scalar impeller::ColorMatrix::array[20]

Definition at line 118 of file color.h.

Referenced by impeller::Color::ApplyColorMatrix(), impeller::testing::TEST_P(), and impeller::ToColorFilter().

The documentation for this struct was generated from the following file:

- impeller/geometry/color.h