| 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 SkRRect_DEFINED | 8 #ifndef SkRRect_DEFINED |
| 9 #define SkRRect_DEFINED | 9 #define SkRRect_DEFINED |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 this->setEmpty(); | 134 this->setEmpty(); |
| 135 return; | 135 return; |
| 136 } | 136 } |
| 137 | 137 |
| 138 memset(fRadii, 0, sizeof(fRadii)); | 138 memset(fRadii, 0, sizeof(fRadii)); |
| 139 fType = kRect_Type; | 139 fType = kRect_Type; |
| 140 | 140 |
| 141 SkDEBUGCODE(this->validate();) | 141 SkDEBUGCODE(this->validate();) |
| 142 } | 142 } |
| 143 | 143 |
| 144 static SkRRect MakeEmpty() { |
| 145 SkRRect rr; |
| 146 rr.setEmpty(); |
| 147 return rr; |
| 148 } |
| 149 |
| 144 static SkRRect MakeRect(const SkRect& r) { | 150 static SkRRect MakeRect(const SkRect& r) { |
| 145 SkRRect rr; | 151 SkRRect rr; |
| 146 rr.setRect(r); | 152 rr.setRect(r); |
| 147 return rr; | 153 return rr; |
| 148 } | 154 } |
| 149 | 155 |
| 150 static SkRRect MakeOval(const SkRect& oval) { | 156 static SkRRect MakeOval(const SkRect& oval) { |
| 151 SkRRect rr; | 157 SkRRect rr; |
| 152 rr.setOval(oval); | 158 rr.setOval(oval); |
| 153 return rr; | 159 return rr; |
| 154 } | 160 } |
| 155 | 161 |
| 156 static SkRRect MakeRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad)
{ | 162 static SkRRect MakeRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad)
{ |
| 157 SkRRect rr; | 163 SkRRect rr; |
| 158 rr.setRectXY(rect, xRad, yRad); | 164 rr.setRectXY(rect, xRad, yRad); |
| 159 return rr; | 165 return rr; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 332 |
| 327 void computeType(); | 333 void computeType(); |
| 328 bool checkCornerContainment(SkScalar x, SkScalar y) const; | 334 bool checkCornerContainment(SkScalar x, SkScalar y) const; |
| 329 void scaleRadii(); | 335 void scaleRadii(); |
| 330 | 336 |
| 331 // to access fRadii directly | 337 // to access fRadii directly |
| 332 friend class SkPath; | 338 friend class SkPath; |
| 333 }; | 339 }; |
| 334 | 340 |
| 335 #endif | 341 #endif |
| OLD | NEW |