OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkStroke_DEFINED | 8 #ifndef SkStroke_DEFINED |
9 #define SkStroke_DEFINED | 9 #define SkStroke_DEFINED |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 SkPaint::Join getJoin() const { return (SkPaint::Join)fJoin; } | 37 SkPaint::Join getJoin() const { return (SkPaint::Join)fJoin; } |
38 void setJoin(SkPaint::Join); | 38 void setJoin(SkPaint::Join); |
39 | 39 |
40 void setMiterLimit(SkScalar); | 40 void setMiterLimit(SkScalar); |
41 void setWidth(SkScalar); | 41 void setWidth(SkScalar); |
42 | 42 |
43 bool getDoFill() const { return SkToBool(fDoFill); } | 43 bool getDoFill() const { return SkToBool(fDoFill); } |
44 void setDoFill(bool doFill) { fDoFill = SkToU8(doFill); } | 44 void setDoFill(bool doFill) { fDoFill = SkToU8(doFill); } |
45 | 45 |
| 46 bool getAutoClose() const { return fAutoClose; } |
| 47 void setAutoClose(bool autoClose) { fAutoClose = autoClose; } |
| 48 |
| 49 bool getReverseInner() const { return fReverseInner; } |
| 50 void setReverseInner(bool reverseInner) { fReverseInner = reverseInner; } |
46 /** | 51 /** |
47 * ResScale is the "intended" resolution for the output. | 52 * ResScale is the "intended" resolution for the output. |
48 * Default is 1.0. | 53 * Default is 1.0. |
49 * Larger values (res > 1) indicate that the result should be more prec
ise, since it will | 54 * Larger values (res > 1) indicate that the result should be more prec
ise, since it will |
50 * be zoomed up, and small errors will be magnified. | 55 * be zoomed up, and small errors will be magnified. |
51 * Smaller values (0 < res < 1) indicate that the result can be less pr
ecise, since it will | 56 * Smaller values (0 < res < 1) indicate that the result can be less pr
ecise, since it will |
52 * be zoomed down, and small errors may be invisible. | 57 * be zoomed down, and small errors may be invisible. |
53 */ | 58 */ |
54 SkScalar getResScale() const { return fResScale; } | 59 SkScalar getResScale() const { return fResScale; } |
55 void setResScale(SkScalar rs) { | 60 void setResScale(SkScalar rs) { |
56 SkASSERT(rs > 0 && SkScalarIsFinite(rs)); | 61 SkASSERT(rs > 0 && SkScalarIsFinite(rs)); |
57 fResScale = rs; | 62 fResScale = rs; |
58 } | 63 } |
59 | 64 |
60 /** | 65 /** |
61 * Stroke the specified rect, winding it in the specified direction.. | 66 * Stroke the specified rect, winding it in the specified direction.. |
62 */ | 67 */ |
63 void strokeRect(const SkRect& rect, SkPath* result, | 68 void strokeRect(const SkRect& rect, SkPath* result, |
64 SkPath::Direction = SkPath::kCW_Direction) const; | 69 SkPath::Direction = SkPath::kCW_Direction) const; |
65 void strokePath(const SkPath& path, SkPath*) const; | 70 void strokePath(const SkPath& path, SkPath*) const; |
66 | 71 |
67 //////////////////////////////////////////////////////////////// | 72 //////////////////////////////////////////////////////////////// |
68 | 73 |
69 private: | 74 private: |
70 SkScalar fWidth, fMiterLimit; | 75 SkScalar fWidth, fMiterLimit; |
71 SkScalar fResScale; | 76 SkScalar fResScale; |
72 uint8_t fCap, fJoin; | 77 uint8_t fCap, fJoin; |
73 SkBool8 fDoFill; | 78 SkBool8 fDoFill; |
| 79 bool fAutoClose; |
| 80 bool fReverseInner; |
74 | 81 |
75 friend class SkPaint; | 82 friend class SkPaint; |
76 }; | 83 }; |
77 | 84 |
78 #endif | 85 #endif |
OLD | NEW |