48 size_t len = strlen(label);
58 paint.setAntiAlias(
true);
63 paint.setARGB(0x20, 0, 0, 0xff);
89 paint.setColorFilter(filter);
108 SkPoint g1Points[] = { { 0, 0 }, { 0, 100 } };
136 {
nullptr,
nullptr },
152 draw_scene(canvas, fFilter, modes[
m], shaders[
i].fShader1,
153 shaders[
i].fShader2);
181 canvas->translate(128,0);
184 canvas->drawImage(img, 0,0);
185 canvas->translate(128,0);
189 "half4 main(half4 inColor) { return inColor.ggga; }"});
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
@ kSrcOver
r = s + (1-sa)*d
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
@ kDstOver
r = d + (1-da)*s
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorBLACK
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void onOnceBeforeDraw() override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
SkString getName() const override
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
static sk_sp< SkColorFilter > WithWorkingFormat(sk_sp< SkColorFilter > child, const skcms_TransferFunction *tf, const skcms_Matrix3x3 *gamut, const SkAlphaType *at)
static sk_sp< SkData > MakeEmpty()
@ 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)
void setBlendMode(SkBlendMode mode)
static Result MakeForColorFilter(SkString sksl, const Options &)
DEF_SIMPLE_GM(AlternateLuma, canvas, 384, 128)
static void draw_scene(SkCanvas *canvas, const sk_sp< SkColorFilter > &filter, SkBlendMode mode, const sk_sp< SkShader > &s1, const sk_sp< SkShader > &s2)
static void draw_label(SkCanvas *canvas, const char *label, const SkPoint &offset)
static constexpr skcms_Matrix3x3 kXYZ
static constexpr skcms_TransferFunction kLinear
Optional< SkRect > bounds
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 mode
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.
static constexpr SkISize Make(int32_t w, int32_t h)
static sk_sp< SkColorFilter > Make()
static constexpr SkPoint Make(float x, float y)
void inset(float dx, float dy)
SkScalar fRight
larger x-axis bounds
static constexpr SkRect MakeWH(float w, float h)