diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-29 12:03:46 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-29 12:03:46 +0000 |
commit | 8b06f1a7ff6d5a59387a90433064550de20787ee (patch) | |
tree | ffe3607c2832ddfcec2d5ecdfb72641e3b9fcba0 /include | |
parent | 398b1bcb7d30f9e55504b6de37d31ccc1a26c876 (diff) |
Detect when the caller was hairline AND strokeandfill, and resolve that into FILL
This fixes the unittests on WIN in the trybot for DEPS roll 4048
Review URL: https://codereview.appspot.com/6242057
git-svn-id: http://skia.googlecode.com/svn/trunk@4057 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkPathEffect.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h index f1bbd7cdb5..8a129fe3ee 100644 --- a/include/core/SkPathEffect.h +++ b/include/core/SkPathEffect.h @@ -46,14 +46,16 @@ public: bool isFillStyle() const { return kFill_Style == this->getStyle(); } - - void setFillStyle(); - void setHairlineStyle() { fWidth = 0; } - void setStrokeStyle(SkScalar width, bool strokeAndFill = false) { - fWidth = width; - fStrokeAndFill = strokeAndFill; - } + void setFillStyle(); + void setHairlineStyle(); + /** + * Specify the strokewidth, and optionally if you want stroke + fill. + * Note, if width==0, then this request is taken to mean: + * strokeAndFill==true -> new style will be Fill + * strokeAndFill==false -> new style will be Hairline + */ + void setStrokeStyle(SkScalar width, bool strokeAndFill = false); void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLimit) { fCap = cap; |