38 void onOnceBeforeDraw()
override {
41 const char*
txt =
"Blobber";
42 size_t txtLen = strlen(
txt);
48 font.setSubpixel(
true);
53 int glyphCount = fGlyphs.
size();
57 memcpy(
run->glyphs, fGlyphs.
begin(), glyphCount *
sizeof(uint16_t));
60 memcpy(
run->glyphs, fGlyphs.
begin(), glyphCount *
sizeof(uint16_t));
61 for (
int i = 0;
i < glyphCount; ++
i) {
66 memcpy(
run->glyphs, fGlyphs.
begin(), glyphCount *
sizeof(uint16_t));
67 for (
int i = 0;
i < glyphCount; ++
i) {
68 run->pos[
i * 2] =
font.getSize() *
i * .75f;
69 run->pos[
i * 2 + 1] = 150 + 5 * sinf((
float)
i * 8 / glyphCount);
95 void onDraw(
SkCanvas* canvas)
override {
102 constexpr int kXCount = 4;
103 constexpr int kYCount = 3;
104 for (
int i = 0;
i < kXCount; ++
i) {
105 for (
int j = 0; j < kYCount; ++j) {
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
@ kAntiAlias
may have transparent pixels on glyph edges
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)
@ kFill_Style
set to fill geometry
PODArray< SkColor > colors
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)
constexpr int32_t width() const
constexpr int32_t height() const
static constexpr SkPoint Make(float x, float y)