| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkPathRef_DEFINED | 9 #ifndef SkPathRef_DEFINED |
| 10 #define SkPathRef_DEFINED | 10 #define SkPathRef_DEFINED |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 * Gets the path ref that is wrapped in the Editor. | 99 * Gets the path ref that is wrapped in the Editor. |
| 100 */ | 100 */ |
| 101 SkPathRef* pathRef() { return fPathRef; } | 101 SkPathRef* pathRef() { return fPathRef; } |
| 102 | 102 |
| 103 void setIsOval(bool isOval) { fPathRef->setIsOval(isOval); } | 103 void setIsOval(bool isOval) { fPathRef->setIsOval(isOval); } |
| 104 | 104 |
| 105 void setBounds(const SkRect& rect) { fPathRef->setBounds(rect); } | 105 void setBounds(const SkRect& rect) { fPathRef->setBounds(rect); } |
| 106 | 106 |
| 107 // In some cases we need to inject a leading moveTo before we add points | 107 // In some cases we need to inject a leading moveTo before we add points |
| 108 // for lineTo, quadTo, conicTo, cubicTo | 108 // for lineTo, quadTo, conicTo, cubicTo |
| 109 // | 109 // |
| 110 // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) | 110 // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) |
| 111 // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(pre
vious moveTo) | 111 // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(pre
vious moveTo) |
| 112 void injectMoveToIfNeeded() { fPathRef->injectMoveToIfNeeded(); } | 112 void injectMoveToIfNeeded() { fPathRef->injectMoveToIfNeeded(); } |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 SkPathRef* fPathRef; | 115 SkPathRef* fPathRef; |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 public: | 118 public: |
| 119 /** | 119 /** |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. | 463 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. |
| 464 }; | 464 }; |
| 465 mutable uint32_t fGenerationID; | 465 mutable uint32_t fGenerationID; |
| 466 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. | 466 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. |
| 467 | 467 |
| 468 friend class PathRefTest_Private; | 468 friend class PathRefTest_Private; |
| 469 typedef SkRefCnt INHERITED; | 469 typedef SkRefCnt INHERITED; |
| 470 }; | 470 }; |
| 471 | 471 |
| 472 #endif | 472 #endif |
| OLD | NEW |