15 : fOnLength(onLength), fOffLength(offLength) {}
22 std::optional<DashPathEffect> dashPathEffect)
23 : fColor(
color), fStrokeWidth(
strokeWidth), fDashPathEffect(dashPathEffect) {
29 if (fDashPathEffect) {
30 const std::array<SkScalar, 4> intervals =
31 {fDashPathEffect->fOnLength, fDashPathEffect->fOffLength,
32 fDashPathEffect->fOnLength, fDashPathEffect->fOffLength};
50 if (blurSigma != 0.0) {
53 paint.setMaskFilter(filter);
static const int strokeWidth
@ kNormal_SkBlurStyle
fuzzy inside and outside
constexpr SkColor SK_ColorTRANSPARENT
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
static sk_sp< SkPathEffect > Make(SkScalar segLength, SkScalar dev, uint32_t seedAssist=0)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setPathEffect(sk_sp< SkPathEffect > pathEffect)
void setStrokeWidth(SkScalar width)
static sk_sp< SkPathEffect > MakeCompose(sk_sp< SkPathEffect > outer, sk_sp< SkPathEffect > inner)
void drawPath(const SkPath &path, const DecorationStyle &decorStyle) override
void translate(SkScalar dx, SkScalar dy) override
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const DecorationStyle &decorStyle) override
void drawTextShadow(const sk_sp< SkTextBlob > &blob, SkScalar x, SkScalar y, SkColor color, SkScalar blurSigma) override
CanvasParagraphPainter(SkCanvas *canvas)
void clipRect(const SkRect &rect) override
void drawFilledRect(const SkRect &rect, const DecorationStyle &decorStyle) override
void drawTextBlob(const sk_sp< SkTextBlob > &blob, SkScalar x, SkScalar y, const SkPaintOrID &paint) override
void drawRect(const SkRect &rect, const SkPaintOrID &paint) override
const SkPaint & skPaint() const
std::variant< SkPaint, PaintID > SkPaintOrID
DashPathEffect(SkScalar onLength, SkScalar offLength)