| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 * in dst. | 74 * in dst. |
| 75 * | 75 * |
| 76 * If there was no change (i.e. style == hairline or fill) this returns | 76 * If there was no change (i.e. style == hairline or fill) this returns |
| 77 * false and dst is unchanged. Otherwise returns true and the result is | 77 * false and dst is unchanged. Otherwise returns true and the result is |
| 78 * stored in dst. | 78 * stored in dst. |
| 79 * | 79 * |
| 80 * src and dst may be the same path. | 80 * src and dst may be the same path. |
| 81 */ | 81 */ |
| 82 bool applyToPath(SkPath* dst, const SkPath& src) const; | 82 bool applyToPath(SkPath* dst, const SkPath& src) const; |
| 83 | 83 |
| 84 bool operator==(const SkStrokeRec& other) const { |
| 85 return fWidth == other.fWidth && |
| 86 fMiterLimit == other.fMiterLimit && |
| 87 fCap == other.fCap && |
| 88 fJoin == other.fJoin && |
| 89 fStrokeAndFill == other.fStrokeAndFill; |
| 90 } |
| 91 |
| 84 private: | 92 private: |
| 85 SkScalar fWidth; | 93 SkScalar fWidth; |
| 86 SkScalar fMiterLimit; | 94 SkScalar fMiterLimit; |
| 87 SkPaint::Cap fCap; | 95 SkPaint::Cap fCap; |
| 88 SkPaint::Join fJoin; | 96 SkPaint::Join fJoin; |
| 89 bool fStrokeAndFill; | 97 bool fStrokeAndFill; |
| 90 }; | 98 }; |
| 91 | 99 |
| 92 #endif | 100 #endif |
| OLD | NEW |