57 paint.setAntiAlias(
true);
71 paint.setAlphaf(0.5f);
77 void onOnceBeforeDraw()
override {
120 void onOnceBeforeDraw()
override {
122 fBitmap.allocN32Pixels(100, 100);
127 paint.setAntiAlias(
true);
130 paint.setStrokeWidth(20);
134 fBitmap.extractAlpha(&fAlpha);
147 paint.setAntiAlias(
true);
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
SK_API SkPMColor SkPreMultiplyColor(SkColor c)
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
#define INHERITED(method,...)
static SkScalar draw_bm(SkCanvas *canvas, sk_sp< SkImage > img, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, SkPaint *paint)
static SkScalar draw_set(SkCanvas *c, sk_sp< SkImage > img, SkScalar x, SkPaint *p)
static void make_bm(SkBitmap *bm)
static SkScalar draw_row(SkCanvas *canvas, sk_sp< SkImage > img)
SkString getName() const override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
sk_sp< SkImage > fImg4444
sk_sp< SkImage > asImage() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
SkColorType colorType() const
@ kStroke_Style
set to stroke geometry
PODArray< SkColor > colors
SkSamplingOptions sampling
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
font
Font Metadata and Metrics.
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkISize Make(int32_t w, int32_t h)