31 {
33 auto canvas = surf->getCanvas();
34
37
38 SkPoint pt = { wScalar / 2, hScalar / 2 };
39
41
49
57
61 for (
int i = 0;
i < 4; ++
i) {
63 pt, radius,
67 0, &mat));
69 rect.inset(wScalar / 8, hScalar / 8);
72 }
73
75
76 paint.setShader(
nullptr);
78 constexpr char kTxt[] = "Skia";
79 SkPoint texPos = { wScalar / 17, hScalar / 2 +
font.getSize() / 2.5f };
87 return surf->makeImageSnapshot();
88}
@ kOpaque_SkAlphaType
pixel is opaque
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
constexpr SkColor SK_ColorDKGRAY
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static const SkMatrix & I()
SkMatrix & preTranslate(SkScalar dx, SkScalar dy)
@ kStroke_Style
set to stroke geometry
static float max(float r, float g, float b)
sk_sp< SkBlender > blender SkRect rect
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.
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
static constexpr SkRect MakeWH(float w, float h)