Flutter Engine
The Flutter Engine
Functions
crbug_1073670.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkFont.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/effects/SkGradientShader.h"
#include "tools/fonts/FontToolUtils.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (crbug_1073670, canvas, 250, 250)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( crbug_1073670  ,
canvas  ,
250  ,
250   
)

Definition at line 16 of file crbug_1073670.cpp.

16 {
17 SkPoint pts[] = {{0, 0}, {0, 250}};
18 SkColor colors[] = {0xFFFF0000, 0xFF0000FF};
20 SkPaint p;
21 p.setShader(sh);
22
24 f.setSize(325);
26
27 canvas->drawString("Gradient", 10, 250, f, p);
28}
uint32_t SkColor
Definition: SkColor.h:37
Definition: SkFont.h:35
@ kAntiAlias
may have transparent pixels on glyph edges
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)
PODArray< SkColor > colors
Definition: SkRecords.h:276
SkFont DefaultPortableFont()
sh
Definition: run_sh.py:10