-= to control width of fatbits line width
Bug: skia: Change-Id: Id100ac5c22f5cc878d782d53557c6b37370a2989 Reviewed-on: https://skia-review.googlesource.com/66621 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
2c35c88315
commit
ce54bcecc2
@ -76,6 +76,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
float fStrokeWidth = 1;
|
||||
|
||||
bool getUseClip() const { return fUseClip; }
|
||||
void setUseClip(bool uc) { fUseClip = uc; }
|
||||
|
||||
@ -131,7 +133,7 @@ private:
|
||||
paint->setStrokeWidth(0);
|
||||
break;
|
||||
case kStroke_Style:
|
||||
paint->setStrokeWidth(SK_Scalar1);
|
||||
paint->setStrokeWidth(fStrokeWidth);
|
||||
break;
|
||||
}
|
||||
paint->setAntiAlias(aa);
|
||||
@ -231,7 +233,7 @@ void FatBits::drawLineSkeleton(SkCanvas* max, const SkPoint pts[]) {
|
||||
if (fStyle == kStroke_Style) {
|
||||
SkPaint p;
|
||||
p.setStyle(SkPaint::kStroke_Style);
|
||||
p.setStrokeWidth(SK_Scalar1 * fZoom);
|
||||
p.setStrokeWidth(fStrokeWidth * fZoom);
|
||||
p.setStrokeCap(fStrokeCap);
|
||||
SkPath dst;
|
||||
p.getFillPath(path, &dst);
|
||||
@ -435,6 +437,14 @@ protected:
|
||||
fFB.setTriangle(!fFB.getTriangle());
|
||||
this->inval(nullptr);
|
||||
return true;
|
||||
case '-':
|
||||
fFB.fStrokeWidth -= 0.125f;
|
||||
this->inval(nullptr);
|
||||
return true;
|
||||
case '=':
|
||||
fFB.fStrokeWidth += 0.125f;
|
||||
this->inval(nullptr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return this->INHERITED::onQuery(evt);
|
||||
|
Loading…
Reference in New Issue
Block a user