4 {
12 {
15 constexpr unsigned kColorCount = 7;
25 }
26
28 const struct {
const char* str;
float radius;
float angle;
SkColor4f color;} kLetters[] = {
36 };
37 for (const auto& v : kLetters) {
40 constexpr double pi_over_180 = 3.141592653589793 / 180;
41 float x = (
float)(0.3 *
scale * v.radius * cos(pi_over_180 * v.angle) - bnds.
centerX());
42 float y = (
float)(0.3 *
scale * v.radius * sin(pi_over_180 * v.angle) - bnds.
centerY());
44 }
45}
46void draw(
SkCanvas* canvas) { draw_color_wheel(canvas, 256); }
47}
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static bool rotate(const SkDCubic &cubic, int zero, int index, SkDCubic &rotPath)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
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)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
sk_sp< SkTypeface > legacyMakeTypeface(const char familyName[], SkFontStyle style) const
static constexpr SkFontStyle Bold()
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
static SkMatrix MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, SkScalar skewY, SkScalar scaleY, SkScalar transY, SkScalar pers0, SkScalar pers1, SkScalar pers2)
void setStyle(Style style)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setShader(sk_sp< SkShader > shader)
void setStrokeWidth(SkScalar width)
sk_sp< SkFontMgr > fontMgr
constexpr SkColor4f kMagenta
constexpr SkColor4f kGreen
constexpr SkColor4f kWhite
constexpr SkColor4f kCyan
constexpr SkColor4f kBlack
constexpr SkColor4f kBlue
constexpr SkColor4f kYellow
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.
constexpr float centerX() const
constexpr float centerY() const