| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 * Transform by the specified matrix, and put the result in dst. | 285 * Transform by the specified matrix, and put the result in dst. |
| 286 * | 286 * |
| 287 * @param matrix SkMatrix specifying the transform. Must only contain | 287 * @param matrix SkMatrix specifying the transform. Must only contain |
| 288 * scale and/or translate, or this call will fail. | 288 * scale and/or translate, or this call will fail. |
| 289 * @param dst SkRRect to store the result. It is an error to use this, | 289 * @param dst SkRRect to store the result. It is an error to use this, |
| 290 * which would make this function no longer const. | 290 * which would make this function no longer const. |
| 291 * @return true on success, false on failure. If false, dst is unmodified. | 291 * @return true on success, false on failure. If false, dst is unmodified. |
| 292 */ | 292 */ |
| 293 bool transform(const SkMatrix& matrix, SkRRect* dst) const; | 293 bool transform(const SkMatrix& matrix, SkRRect* dst) const; |
| 294 | 294 |
| 295 #ifdef SK_DEVELOPER |
| 296 /** |
| 297 * Prints the rrect using SkDebugf. This is intended for Skia development de
bugging. Don't |
| 298 * rely on the existence of this function or the formatting of its output. |
| 299 */ |
| 300 void dump() const; |
| 301 #endif |
| 302 |
| 295 private: | 303 private: |
| 296 SkRect fRect; | 304 SkRect fRect; |
| 297 // Radii order is UL, UR, LR, LL. Use Corner enum to index into fRadii[] | 305 // Radii order is UL, UR, LR, LL. Use Corner enum to index into fRadii[] |
| 298 SkVector fRadii[4]; | 306 SkVector fRadii[4]; |
| 299 mutable Type fType; | 307 mutable Type fType; |
| 300 // TODO: add padding so we can use memcpy for flattening and not copy | 308 // TODO: add padding so we can use memcpy for flattening and not copy |
| 301 // uninitialized data | 309 // uninitialized data |
| 302 | 310 |
| 303 void computeType() const; | 311 void computeType() const; |
| 304 bool checkCornerContainment(SkScalar x, SkScalar y) const; | 312 bool checkCornerContainment(SkScalar x, SkScalar y) const; |
| 305 | 313 |
| 306 // to access fRadii directly | 314 // to access fRadii directly |
| 307 friend class SkPath; | 315 friend class SkPath; |
| 308 }; | 316 }; |
| 309 | 317 |
| 310 #endif | 318 #endif |
| OLD | NEW |