38 src.allocN32Pixels(10, 10);
72 const SkScalar intervals[] = { 20, 10, 5, 10 };
83 kBelowThreshold_TextSize = 255,
84 kAboveThreshold_TextSize = 257
92 paint.setAntiAlias(
true);
97 canvas->translate(600, 0);
98 font.setSize(kAboveThreshold_TextSize);
108 if (!variableStream) {
119 if (!
ttf && !otf && !overlap) {
120 msg->append(
"No support for ttf or otf.");
125 p.setAntiAlias(
true);
127 p.setStrokeWidth(10);
130 p.setARGB(0xff, 0xbb, 0x00, 0x00);
144 canvas->drawString(
"○◉ ⁻₋⁺₊", 10, 100,
font,
p);
145 canvas->drawString(
"⁰₀¹₁²₂³₃", 10, 200,
font,
p);
158 canvas->drawString(
"○◉ ⁰¹³ᶠ", 10, 300,
font,
p);
168 canvas->drawString(
"tŧ", 10, 400,
font,
p);
static const int strokeWidth
std::unique_ptr< SkStreamAsset > GetResourceAsStream(const char *resource, bool useFileStream)
constexpr SkColor SK_ColorRED
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d)
bool setInfo(const SkImageInfo &imageInfo, size_t rowBytes=0)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
bool writePixels(const SkImageInfo &info, const void *pixels, size_t rowBytes, int x, int y)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
static sk_sp< SkTextBlob > MakeFromPosText(const void *text, size_t byteLength, const SkPoint pos[], const SkFont &font, SkTextEncoding encoding=SkTextEncoding::kUTF8)
const EmbeddedViewParams * params
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.
DEF_SIMPLE_GM(stroketext, canvas, 1200, 480)
static void draw_text_set(SkCanvas *canvas, const SkPaint &paint, const SkFont &font)
static void draw_text_stroked(SkCanvas *canvas, const SkPaint &paint, const SkFont &font, SkScalar strokeWidth)
DEF_SIMPLE_GM_CAN_FAIL(stroketext_native, canvas, msg, 650, 420)
static void test_nulldev(SkCanvas *canvas)
static SkImageInfo MakeN32Premul(int width, int height)