Go to the source code of this file.
◆ HEIGHT
◆ WIDTH
◆ DEF_SIMPLE_GM_BG() [1/2]
Definition at line 33 of file overdrawcanvas.cpp.
33 {
34
39
41
48
51
53
54
58 canvas->drawString(
"This is some text:", 180, 300,
font,
SkPaint());
59}
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static sk_sp< SkColorFilter > MakeWithSkColors(const SkColor[kNumColors])
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.
static const SkColor kOverdrawColors[6]
static SkImageInfo MakeA8(int width, int height)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
◆ DEF_SIMPLE_GM_BG() [2/2]
DEF_SIMPLE_GM_BG |
( |
overdraw_text_xform |
, |
|
|
canvas |
, |
|
|
512 |
, |
|
|
512 |
, |
|
|
SK_ColorBLACK |
|
|
) |
| |
Definition at line 93 of file overdrawcanvas.cpp.
93 {
98}
constexpr SkColor SK_ColorWHITE
void setColor(SkColor color)
static sk_sp< SkImage > overdraw_text_grid(bool useCTM)
◆ overdraw_text_grid()
Definition at line 61 of file overdrawcanvas.cpp.
61 {
64
67
69
70 for (int n = 1; n <= 20; n++) {
71 const float x = 10.0f;
72 const float y = n * 20.0f;
73
74 for (
int i = 0;
i < n * 10;
i++) {
75 const char*
text =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
76 if (useCTM) {
77 canvas.save();
78 canvas.translate(
x,
y);
80 canvas.restore();
81 } else {
83 }
84 }
85 }
86 return surface->makeImageSnapshot();
87}
◆ kOverdrawColors
Initial value:= {
0x00000000, 0x5fff0000, 0x2f0000ff, 0x2f00ff00, 0x3fff0000, 0x7fff0000,
}
Definition at line 28 of file overdrawcanvas.cpp.