This test case is a mirror of the Android CTS tests for MatrixColorFilter found in the android.graphics.ColorMatrixColorFilterTest class.
35 {
36
38 bitmap.allocN32Pixels(1,1);
39
42
43 float blueToCyan[20] = {
44 1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
45 0.0f, 1.0f, 1.0f, 0.0f, 0.0f,
46 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
47 0.0f, 0.0f, 0.0f, 1.0f, 0.0f };
49
51 canvas.drawPoint(0, 0,
paint);
53
55 canvas.drawPoint(0, 0,
paint);
57
59 canvas.drawPoint(0, 0,
paint);
61
62
64 canvas.drawPoint(0, 0,
paint);
66
67 float transparentRedAddBlue[20] = {
68 1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
69 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
70 0.0f, 0.0f, 1.0f, 0.0f, 64.0f/255,
71 -0.5f, 0.0f, 0.0f, 1.0f, 0.0f
72 };
75
77 canvas.drawPoint(0, 0,
paint);
79
81 canvas.drawPoint(0, 0,
paint);
82
84
85
87 transparentRedAddBlue[6] = 0.0f;
88
89
90 canvas.drawPoint(0, 0,
paint);
92
93
95 canvas.drawPoint(0, 0,
paint);
97}
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE