Go to the source code of this file.
|
| REG_FIDDLE (Bitmap_extractAlpha, 256, 100, false, 0) |
|
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Bitmap_extractAlpha |
, |
|
|
256 |
, |
|
|
100 |
, |
|
|
false |
, |
|
|
0 |
|
|
) |
| |
Definition at line 4 of file Bitmap_extractAlpha.cpp.
4 {
7 bitmap.allocN32Pixels(100, 100);
9 offscreen.clear(0);
11 paint.setAntiAlias(
true);
14 paint.setStrokeWidth(20);
15 offscreen.drawCircle(50, 50, 39,
paint);
16 bitmap.extractAlpha(&alpha);
20}
21}
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
sk_sp< SkImage > asImage() const
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
@ kStroke_Style
set to stroke geometry