94 src->allocN32Pixels(
w,
h);
107 r.
setWH(ww*3/4, hh*3/4);
111 dst->allocN32Pixels(
w,
h);
117 r.
setLTRB(ww/3, hh/3, ww*19/20, hh*19/20);
125static uint16_t
gData[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF };
129 SkBitmap fSrcB, fDstB, fTransparent;
139 bool restoreNeeded =
false;
140 m.setTranslate(
x,
y);
143 p.setBlendMode(
mode);
157 restoreNeeded =
true;
175 restoreNeeded =
true;
186 w * 37 / 60,
h * 37 / 60);
212 void onOnceBeforeDraw()
override {
221 const static int W = 64;
222 const static int H = 64;
249 for (
int sourceType = 1; sourceType &
kAll_SrcType; sourceType <<= 1) {
269 p.setShader(
nullptr);
278 if ((
i % kWrap) == kWrap - 1) {
296 using INHERITED =
GM;
@ kOpaque_SkAlphaType
pixel is opaque
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
@ kExclusion
rc = s + d - two(s*d), ra = kSrcOver
@ kSaturation
saturation of source with hue and luminosity of destination
@ kColorBurn
darken destination to reflect source
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kHue
hue of source with saturation and luminosity of destination
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kColorDodge
brighten destination to reflect source
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kLuminosity
luminosity of source with hue and saturation of destination
@ kSoftLight
lighten or darken, depending on source
@ kDifference
rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver
@ kOverlay
multiply or screen, depending on destination
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
@ kDstOver
r = d + (1-da)*s
@ kColor
hue and saturation of source with luminosity of destination
@ kHardLight
multiply or screen, depending on source
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
constexpr SkColor SK_ColorTRANSPARENT
sk_sp< SkImage > asImage() const
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
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 translate(SkScalar dx, SkScalar dy)
void concat(const SkMatrix &matrix)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
static void DrawString(SkCanvas *canvas, const char text[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint, Align align=kLeft_Align)
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
GM(SkColor backgroundColor=SK_ColorWHITE)
Optional< SkRect > bounds
SkSamplingOptions sampling
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.
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
void setWH(float width, float height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
void setLTRB(float left, float top, float right, float bottom)
const struct @268 gModes[]
@ kBasic_SrcType
Just basic source types.
@ kRectangleImageWithAlpha_SrcType
kRectangleImage_SrcType with an alpha of 34.5%.
@ kRectangleImage_SrcType
A WxH image with a rectangle in the lower right.
@ kSmallRectangleImageWithAlpha_SrcType
kRectnagleImageWithAlpha_SrcType scaled down by half.
@ kAll_SrcType
All the source types.
@ kSmallTransparentImage_SrcType
A W/2xH/2 transparent image.
@ kQuarterClear_SrcType
Two rectangles, first on the right half, second on the bottom half.
@ kRectangle_SrcType
kRectangleImage_SrcType drawn directly instead in an image.
@ kRectangleWithMask_SrcType
kRectangleImage_SrcType drawn directly with a mask.
@ kQuarterClearInLayer_SrcType
kQuarterClear_SrcType in a layer.
static void make_bitmaps(int w, int h, SkBitmap *src, SkBitmap *dst, SkBitmap *transparent)