112 {
114 paint.setAntiAlias(
true);
115 const char* fam[] = { "sans-serif", "serif", "monospace" };
116 const char test[] =
"aAjJgGyY_|{-(~[,]qQ}pP}zZ";
117 const SkPoint blobOffset = { 10, 80 };
118
120 for (
SkScalar textSize = 100; textSize > 10; textSize -= 20) {
122 const SkScalar uWidth = textSize / 15;
123 paint.setStrokeWidth(uWidth);
125
127 canvas->drawTextBlob(blob, blobOffset.
x(), blobOffset.
y(),
paint);
128
130 const SkScalar bounds[2] = { uPos - uWidth / 2, uPos + uWidth / 2 };
133
135 intercepts.
resize(interceptCount);
137
141 underline.
offset(blobOffset.
x(), blobOffset.
y());
143 canvas->drawPath(underline,
paint);
144
145 canvas->translate(0, textSize * 1.3f);
146 }
147
148 canvas->translate(0, 60);
149 }
150}
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
void offset(SkScalar dx, SkScalar dy, SkPath *dst) const
int getIntercepts(const SkScalar bounds[2], SkScalar intervals[], const SkPaint *paint=nullptr) const
const SkRect & bounds() const
Optional< SkRect > bounds
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.
constexpr float y() const
constexpr float x() const
constexpr float left() const
constexpr float right() const
static SkPath create_underline(const SkTDArray< SkScalar > &intersections, SkScalar last, SkScalar finalPos, SkScalar uPos, SkScalar uWidth, SkScalar textSize)