27 void onOnceBeforeDraw()
override {
34 static constexpr char txt[] =
"TEST";
42 const auto& buf =
builder.allocRunRSXform(
font, glyph_count);
46 for (
int i = 0;
i < glyph_count; ++
i) {
57 void onDraw(
SkCanvas* canvas)
override {
58 canvas->
scale(kScale, kScale);
59 this->draw_one(canvas,
61 this->draw_one(canvas,
63 this->draw_one(canvas,
65 this->draw_one(canvas,
75 p.setShader(make_shader(lm, outer_lm));
85 static constexpr SkISize kTileSize = { 30, 30 };
90 p.setColor(0xffffff00);
92 p.setColor(0xff008000);
94 ->drawRect({0, 0, kTileSize.
width()*0.9f, kTileSize.
height()*0.9f},
p);
96 return surface->makeImageSnapshot()
99 ->makeWithLocalMatrix(outer_lm);
102 inline static constexpr float kSZ = 300,
103 kFontSZ = kSZ * 0.38,
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void scale(SkScalar sx, SkScalar sy)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
@ kAntiAlias
may have transparent pixels on glyph edges
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix RotateDeg(SkScalar deg)
static const SkMatrix & I()
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.
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkISize Make(int32_t w, int32_t h)
constexpr int32_t width() const
constexpr int32_t height() const
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeWH(float w, float h)