31#define W SkIntToScalar(80)
32#define H SkIntToScalar(60)
37 paint->setShader(
nullptr);
42 const SkPoint pts[] = { { 0, 0 }, {
W,
H } };
57 p.setStrokeWidth(
H/5);
80 SkISize getISize()
override {
return {640, 760}; }
87 paint.setColor(0x80F60000);
89 const Proc procs[] = {
101 for (
int aa = 0; aa <= 1; ++aa) {
108 paint.setBlendMode(modes[
x]);
112 canvas->translate(0,
H * 5 / 4);
133 void onDraw(
SkCanvas* canvas)
override {
134 auto surf(compat_surface(canvas, this->getISize()));
136 this->drawContent(surf->getCanvas());
137 surf->draw(canvas, 0, 0);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kSrcOver
r = s + (1-sa)*d
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static constexpr bool SkToBool(const T &x)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
sk_sp< SkSurface > makeSurface(const SkImageInfo &info, const SkSurfaceProps *props=nullptr)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
@ kAntiAlias
may have transparent pixels on glyph edges
@ kAlias
no transparent pixels on glyph edges
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
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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.
void(* PaintProc)(SkPaint *)
static void draw_hair(SkCanvas *canvas, const SkPaint &paint, const SkFont &)
static void draw_rect(SkCanvas *canvas, const SkPaint &paint, const SkFont &)
static void draw_text(SkCanvas *canvas, const SkPaint &paint, const SkFont &font)
static void gradient_paintproc(SkPaint *paint)
static void draw_thick(SkCanvas *canvas, const SkPaint &paint, const SkFont &)
static void draw_oval(SkCanvas *canvas, const SkPaint &paint, const SkFont &)
static void identity_paintproc(SkPaint *paint)
void(* Proc)(SkCanvas *, const SkPaint &, const SkFont &)
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeWH(float w, float h)