OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkStrokeRec_DEFINED | 8 #ifndef SkStrokeRec_DEFINED |
9 #define SkStrokeRec_DEFINED | 9 #define SkStrokeRec_DEFINED |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 * strokeAndFill==false -> new style will be Hairline | 57 * strokeAndFill==false -> new style will be Hairline |
58 */ | 58 */ |
59 void setStrokeStyle(SkScalar width, bool strokeAndFill = false); | 59 void setStrokeStyle(SkScalar width, bool strokeAndFill = false); |
60 | 60 |
61 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim it) { | 61 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim it) { |
62 fCap = cap; | 62 fCap = cap; |
63 fJoin = join; | 63 fJoin = join; |
64 fMiterLimit = miterLimit; | 64 fMiterLimit = miterLimit; |
65 } | 65 } |
66 | 66 |
67 void setResScale(SkScalar rs); | |
reed1
2015/04/13 17:10:22
I think you can inline the impl here, as we did fo
| |
68 | |
67 /** | 69 /** |
68 * Returns true if this specifes any thick stroking, i.e. applyToPath() | 70 * Returns true if this specifes any thick stroking, i.e. applyToPath() |
69 * will return true. | 71 * will return true. |
70 */ | 72 */ |
71 bool needToApply() const { | 73 bool needToApply() const { |
72 Style style = this->getStyle(); | 74 Style style = this->getStyle(); |
73 return (kStroke_Style == style) || (kStrokeAndFill_Style == style); | 75 return (kStroke_Style == style) || (kStrokeAndFill_Style == style); |
74 } | 76 } |
75 | 77 |
76 /** | 78 /** |
(...skipping 26 matching lines...) Expand all Loading... | |
103 | 105 |
104 SkScalar fResScale; | 106 SkScalar fResScale; |
105 SkScalar fWidth; | 107 SkScalar fWidth; |
106 SkScalar fMiterLimit; | 108 SkScalar fMiterLimit; |
107 SkPaint::Cap fCap; | 109 SkPaint::Cap fCap; |
108 SkPaint::Join fJoin; | 110 SkPaint::Join fJoin; |
109 bool fStrokeAndFill; | 111 bool fStrokeAndFill; |
110 }; | 112 }; |
111 | 113 |
112 #endif | 114 #endif |
OLD | NEW |