Go to the source code of this file.
◆ make_bm0()
Definition at line 40 of file tablecolorfilter.cpp.
40 {
45
49 canvas.drawPaint(
paint);
50}
constexpr SkColor SK_ColorTRANSPARENT
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
static sk_sp< SkShader > make_shader0(int w, int h)
◆ make_bm1()
Definition at line 60 of file tablecolorfilter.cpp.
60 {
67
71 paint.setAntiAlias(
true);
72 canvas.drawCircle(cx, cy, cx,
paint);
73}
static sk_sp< SkShader > make_shader1(int w, int h)
◆ make_cf0()
Definition at line 97 of file tablecolorfilter.cpp.
97 {
100}
static sk_sp< SkColorFilter > Table(const uint8_t table[256])
static void make_table0(uint8_t table[])
◆ make_cf1()
◆ make_cf2()
◆ make_cf3()
Definition at line 109 of file tablecolorfilter.cpp.
109 {
114}
static sk_sp< SkColorFilter > TableARGB(const uint8_t tableA[256], const uint8_t tableR[256], const uint8_t tableG[256], const uint8_t tableB[256])
◆ make_null_cf()
◆ make_shader0()
Definition at line 31 of file tablecolorfilter.cpp.
31 {
36 };
39}
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
PODArray< SkColor > colors
◆ make_shader1()
Definition at line 51 of file tablecolorfilter.cpp.
51 {
56 };
59}
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static constexpr SkPoint Make(float x, float y)
◆ make_table0()
static void make_table0 |
( |
uint8_t |
table[] | ) |
|
|
static |
Definition at line 75 of file tablecolorfilter.cpp.
75 {
76 for (int i = 0; i < 256; ++i) {
77 int n = i >> 5;
78 table[i] = (n << 5) | (n << 2) | (n >> 1);
79 }
80}
◆ make_table1()
static void make_table1 |
( |
uint8_t |
table[] | ) |
|
|
static |
◆ make_table2()
static void make_table2 |
( |
uint8_t |
table[] | ) |
|
|
static |
Definition at line 86 of file tablecolorfilter.cpp.
86 {
87 for (int i = 0; i < 256; ++i) {
88 float fi = i / 255.0f;
89 table[i] =
static_cast<uint8_t
>(sqrtf(fi) * 255);
90 }
91}
◆ gColors0
Definition at line 281 of file tablecolorfilter.cpp.
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
◆ gColors1
const SkColor gColors1[] = { 0x80FF0000, 0x8000FF00, 0x800000FF } |
◆ gModes0
Initial value:= {
}
@ kExclusion
rc = s + d - two(s*d), ra = kSrcOver
@ kColorBurn
darken destination to reflect source
@ kOverlay
multiply or screen, depending on destination
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
Definition at line 282 of file tablecolorfilter.cpp.
◆ gModes1
Initial value:= {
}
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kSrcATop
r = s*da + d*(1-sa)
Definition at line 291 of file tablecolorfilter.cpp.