28 {
29 if (!canvas->getSurface()) {
30
31
32
33 *errorMsg = "Not supported in recording mode";
35 }
36
37
44
47 surface->getCanvas()->drawPaint(gradientPaint);
49
50
51
52
53
54
55
56 canvas->translate(5, 5);
57
58 canvas->drawImage(
image, 0, 0);
59 canvas->translate(105, 0);
60
64 canvas->drawRect({0, 0, 100, 100}, imageShaderPaint);
65 canvas->translate(105, 0);
66
70 canvas->translate(105, 0);
71
72
74 canvas->drawRect({0, 0, 100, 100}, gradientPaint);
75
78 canvas->drawPaint(colorStretchPaint);
79
81}
static const int points[]
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
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)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void setDither(bool dither)
void setShader(sk_sp< SkShader > shader)
void setBlender(sk_sp< SkBlender > blender)
sk_sp< SkBlender > stretch_colors_blender()
sk_sp< const SkImage > image
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
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)