| 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 SkPathOpsQuad_DEFINED | 8 #ifndef SkPathOpsQuad_DEFINED |
| 9 #define SkPathOpsQuad_DEFINED | 9 #define SkPathOpsQuad_DEFINED |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 void debugInit() { | 39 void debugInit() { |
| 40 sk_bzero(fPts, sizeof(fPts)); | 40 sk_bzero(fPts, sizeof(fPts)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 SkDQuad flip() const { | 43 SkDQuad flip() const { |
| 44 SkDQuad result = {{fPts[2], fPts[1], fPts[0]}}; | 44 SkDQuad result = {{fPts[2], fPts[1], fPts[0]}}; |
| 45 return result; | 45 return result; |
| 46 } | 46 } |
| 47 | 47 |
| 48 static bool IsCubic() { return false; } | 48 static bool IsConic() { return false; } |
| 49 | 49 |
| 50 const SkDQuad& set(const SkPoint pts[kPointCount]) { | 50 const SkDQuad& set(const SkPoint pts[kPointCount]) { |
| 51 fPts[0] = pts[0]; | 51 fPts[0] = pts[0]; |
| 52 fPts[1] = pts[1]; | 52 fPts[1] = pts[1]; |
| 53 fPts[2] = pts[2]; | 53 fPts[2] = pts[2]; |
| 54 return *this; | 54 return *this; |
| 55 } | 55 } |
| 56 | 56 |
| 57 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount
); return fPts[n]; } | 57 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount
); return fPts[n]; } |
| 58 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fP
ts[n]; } | 58 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fP
ts[n]; } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // utilities callable by the user from the debugger when the implementation
code is linked in | 91 // utilities callable by the user from the debugger when the implementation
code is linked in |
| 92 void dump() const; | 92 void dump() const; |
| 93 void dumpID(int id) const; | 93 void dumpID(int id) const; |
| 94 void dumpInner() const; | 94 void dumpInner() const; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 // static double Tangent(const double* quadratic, double t); // uncalled | 97 // static double Tangent(const double* quadratic, double t); // uncalled |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 #endif | 100 #endif |
| OLD | NEW |