| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 * strokeAndFill==false -> new style will be Hairline | 56 * strokeAndFill==false -> new style will be Hairline |
| 57 */ | 57 */ |
| 58 void setStrokeStyle(SkScalar width, bool strokeAndFill = false); | 58 void setStrokeStyle(SkScalar width, bool strokeAndFill = false); |
| 59 | 59 |
| 60 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim
it) { | 60 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim
it) { |
| 61 fCap = cap; | 61 fCap = cap; |
| 62 fJoin = join; | 62 fJoin = join; |
| 63 fMiterLimit = miterLimit; | 63 fMiterLimit = miterLimit; |
| 64 } | 64 } |
| 65 | 65 |
| 66 SkScalar getResScale() const { |
| 67 return fResScale; |
| 68 } |
| 69 |
| 66 void setResScale(SkScalar rs) { | 70 void setResScale(SkScalar rs) { |
| 67 SkASSERT(rs > 0 && SkScalarIsFinite(rs)); | 71 SkASSERT(rs > 0 && SkScalarIsFinite(rs)); |
| 68 fResScale = rs; | 72 fResScale = rs; |
| 69 } | 73 } |
| 70 | 74 |
| 71 /** | 75 /** |
| 72 * Returns true if this specifes any thick stroking, i.e. applyToPath() | 76 * Returns true if this specifes any thick stroking, i.e. applyToPath() |
| 73 * will return true. | 77 * will return true. |
| 74 */ | 78 */ |
| 75 bool needToApply() const { | 79 bool needToApply() const { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // | 126 // |
| 123 // fCap and fJoin are larger than needed to avoid having to initialize | 127 // fCap and fJoin are larger than needed to avoid having to initialize |
| 124 // any pad values | 128 // any pad values |
| 125 uint32_t fCap : 16; // SkPaint::Cap | 129 uint32_t fCap : 16; // SkPaint::Cap |
| 126 uint32_t fJoin : 15; // SkPaint::Join | 130 uint32_t fJoin : 15; // SkPaint::Join |
| 127 uint32_t fStrokeAndFill : 1; // bool | 131 uint32_t fStrokeAndFill : 1; // bool |
| 128 }; | 132 }; |
| 129 SK_END_REQUIRE_DENSE | 133 SK_END_REQUIRE_DENSE |
| 130 | 134 |
| 131 #endif | 135 #endif |
| OLD | NEW |