29 0x00000000, 0x5fff0000, 0x2f0000ff, 0x2f00ff00, 0x3fff0000, 0x7fff0000,
58 canvas->drawString(
"This is some text:", 180, 300,
font,
SkPaint());
70 for (
int n = 1; n <= 20; n++) {
71 const float x = 10.0f;
72 const float y = n * 20.0f;
74 for (
int i = 0;
i < n * 10;
i++) {
75 const char*
text =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
78 canvas.translate(
x,
y);
86 return surface->makeImageSnapshot();
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
static sk_sp< SkColorFilter > MakeWithSkColors(const SkColor[kNumColors])
void setColor(SkColor color)
sk_sp< SkImage > makeImageSnapshot()
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 counts
font
Font Metadata and Metrics.
DEF_SIMPLE_GM_BG(overdraw_canvas, canvas, WIDTH, HEIGHT, SK_ColorWHITE)
static const SkColor kOverdrawColors[6]
static sk_sp< SkImage > overdraw_text_grid(bool useCTM)
static SkImageInfo MakeA8(int width, int height)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)