Lines Matching refs:paint
23 SkStrokeRec::SkStrokeRec(const SkPaint& paint, SkScalar resScale) {
24 this->init(paint, paint.getStyle(), resScale);
27 SkStrokeRec::SkStrokeRec(const SkPaint& paint, SkPaint::Style styleOverride, SkScalar resScale) {
28 this->init(paint, styleOverride, resScale);
31 void SkStrokeRec::init(const SkPaint& paint, SkPaint::Style style, SkScalar resScale) {
40 fWidth = paint.getStrokeWidth();
44 if (0 == paint.getStrokeWidth()) {
49 fWidth = paint.getStrokeWidth();
54 SkDEBUGFAIL("unknown paint style");
61 // copy these from the paint, regardless of our "style"
62 fMiterLimit = paint.getStrokeMiter();
63 fCap = paint.getStrokeCap();
64 fJoin = paint.getStrokeJoin();
125 void SkStrokeRec::applyToPaint(SkPaint* paint) const {
127 paint->setStyle(SkPaint::kFill_Style);
131 paint->setStyle(fStrokeAndFill ? SkPaint::kStrokeAndFill_Style : SkPaint::kStroke_Style);
132 paint->setStrokeWidth(fWidth);
133 paint->setStrokeMiter(fMiterLimit);
134 paint->setStrokeCap((SkPaint::Cap)fCap);
135 paint->setStrokeJoin((SkPaint::Join)fJoin);
142 SkScalar SkStrokeRec::GetInflationRadius(const SkPaint& paint, SkPaint::Style style) {
143 SkScalar width = SkPaint::kFill_Style == style ? -SK_Scalar1 : paint.getStrokeWidth();
144 return GetInflationRadius(paint.getStrokeJoin(), paint.getStrokeMiter(), paint.getStrokeCap(),