14 SkPaint outlinePaint(strokePaint);
17 for (
SkScalar precision : { 0.01f, .1f, 1.f, 10.f, 100.f } ) {
20 canvas->
drawPath(fillPath, outlinePaint);
22 if (1.f == precision) canvas->
translate(-180, 100);
REG_FIDDLE(FillPathWithPaint, 256, 192, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
void setStyle(Style style)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
void transform(const SkMatrix &matrix, SkPath *dst, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
static void strokePath(SkCanvas *canvas, const SkPath &path)
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)