Flutter Engine
The Flutter Engine
crbug_1073670.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2020 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "gm/gm.h"
10#include "include/core/SkFont.h"
12#include "include/core/SkPath.h"
15
16DEF_SIMPLE_GM(crbug_1073670, canvas, 250, 250) {
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)
DEF_SIMPLE_GM(crbug_1073670, canvas, 250, 250)
PODArray< SkColor > colors
Definition: SkRecords.h:276
SkFont DefaultPortableFont()
sh
Definition: run_sh.py:10