4 {
5
6
9 return {(
s *
s * p0.
x()) + (2 *
s * t * p1.
x()) + (t * t * p2.
x()),
10 (
s *
s * p0.
y()) + (2 *
s * t * p1.
y()) + (t * t * p2.
y())};
11}
12
13
14
15
16
17
18
19
20
21
22
23
27}
28
31}
32
35}
36
39
41 paint.setAntiAlias(
true);
43 paint.setStrokeWidth(5);
44
48
51
54
55 paint.setStrokeWidth(1);
57 paint.setStrokeWidth(5);
58
64
71
77 draw_point(canvas, quad(
a,
b, c,
frame), pointPaint);
78}
79}
static double interpolate(double A, double B, double t)
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static SkScalar SkScalarInterp(SkScalar A, SkScalar B, SkScalar t)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void clear(SkColor color)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
void setColor(SkColor color)
void setAntiAlias(bool aa)
void setStrokeCap(Cap cap)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2)
sk_sp< SkFontMgr > fontMgr
static void draw_line(SkCanvas *canvas, SkImage *, const SkRect &r, sk_sp< SkImageFilter > imf)
font
Font Metadata and Metrics.
constexpr float y() const
constexpr float x() const