63 0xFFFFFF00, 0xFFFF00FF, 0xFF00FFFF,
64 0xFFFF0000, 0xFF00FF00, 0xFF0000FF,
68 const char*
text =
"Hamburgefons";
83 y +=
font.getSize() * 2;
98 const SkPoint pts[] = { { 0, 0 }, { 240, 0 } };
107 static const char text[] =
"Now is the time for all good";
113 paint.setShader(shader);
142 paint.setAntiAlias(
true);
161 const char*
kText =
"ABCDEFG";
167 canvas->translate(10, 30);
168 for (
int i = 0;
i < 256;
i += 20) {
177 canvas->translate(0, 20);
#define SkColorSetRGB(r, g, b)
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
SkString getName() const override
void onOnceBeforeDraw() override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
void onDraw(SkCanvas *canvas) override
static void drawGrad(SkCanvas *canvas)
SkISize getISize() override
SkString getName() const override
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
static sk_sp< SkColorSpace > MakeSRGB()
static constexpr SkFontStyle Italic()
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > make_gradient(SkColor c)
static sk_sp< SkShader > make_heatGradient(const SkPoint pts[2])
static void draw_pair(SkCanvas *canvas, const SkFont &font, SkColor color, const sk_sp< SkShader > &shader)
DEF_SIMPLE_GM_BG(gammatext_color_shader, canvas, 300, 275, SK_ColorGRAY)
PODArray< SkColor > colors
SK_API sk_sp< SkShader > Color(SkColor)
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)