157 {
159
166 kRadius * 2), 0, 360,
false, circlePaint);
167
174 cubicPath.
moveTo(fCubicX[0], fCubicY[0]);
175 cubicPath.
cubicTo(fCubicX[1], fCubicY[1], fCubicX[2], fCubicY[2], fCubicX[3], fCubicY[3]);
176 canvas->
drawPath(cubicPath, cubicPaint);
177
183 {(
float)fCubicX[3], (
float)fCubicY[3]}};
185
188 constexpr static float kInfoTextSize = 16;
190 int infoY = 10 + kInfoTextSize;
191 for (
const SkString& infoString : fInfoStrings) {
192 canvas->
drawString(infoString.c_str(), 10, infoY,
font, textPaint);
193 infoY += kInfoTextSize * 3/2;
194 }
195}
static constexpr int kCenterX
static constexpr int kCenterY
static constexpr int kRadius
static const int points[]
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void clear(SkColor color)
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
@ kPoints_PointMode
draw each point separately
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
font
Font Metadata and Metrics.
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)