Go to the source code of this file.
|
| REG_FIDDLE (skpaint_color_table_filter, 256, 256, false, 3) |
|
◆ REG_FIDDLE()
REG_FIDDLE |
( |
skpaint_color_table_filter |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
3 |
|
|
) |
| |
Definition at line 4 of file skpaint_color_table_filter.cpp.
4 {
6 canvas->
scale(0.5, 0.5);
7 uint8_t ct[256];
8 for (int i = 0; i < 256; ++i) {
9 int x = (i - 96) * 255 / 64;
10 ct[i] = x < 0 ? 0 : x > 255 ? 255 :
x;
11 }
15}
16}
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
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])