4REG_FIDDLE(SkPath_cubicTo_example_parametric, 512, 512,
false, 0) {
22 return {(
s *
s *
s * p0.
x()) + (3 *
s *
s * t * p1.
x()) + (3 *
s * t * t * p2.
x()) +
24 (
s *
s *
s * p0.
y()) + (3 *
s *
s * t * p1.
y()) + (3 *
s * t * t * p2.
y()) +
25 (t * t * t * p3.
y())};
33 paint.setAntiAlias(
true);
35 paint.setStrokeWidth(5);
70 for (
int i = 0;
i <=
N; ++
i) {
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
REG_FIDDLE(SkPath_cubicTo_example_parametric, 512, 512, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPoint(SkScalar x, SkScalar y, 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 & lineTo(SkScalar x, SkScalar y)
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
sk_sp< SkFontMgr > fontMgr
font
Font Metadata and Metrics.
constexpr float y() const
constexpr float x() const