| 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 #ifndef SkPathOpBounds_DEFINED | 7 #ifndef SkPathOpBounds_DEFINED |
| 8 #define SkPathOpBounds_DEFINED | 8 #define SkPathOpBounds_DEFINED |
| 9 | 9 |
| 10 #include "SkPathOpsRect.h" | 10 #include "SkPathOpsRect.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 // unlike isEmpty(), this permits lines, but not points | 50 // unlike isEmpty(), this permits lines, but not points |
| 51 // FIXME: unused for now | 51 // FIXME: unused for now |
| 52 bool isReallyEmpty() const { | 52 bool isReallyEmpty() const { |
| 53 // use !<= instead of > to detect NaN values | 53 // use !<= instead of > to detect NaN values |
| 54 return !(fLeft <= fRight) || !(fTop <= fBottom) | 54 return !(fLeft <= fRight) || !(fTop <= fBottom) |
| 55 || (fLeft == fRight && fTop == fBottom); | 55 || (fLeft == fRight && fTop == fBottom); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void setCubicBounds(const SkPoint a[4]); | 58 void setConicBounds(const SkPoint a[3], SkScalar weight); |
| 59 void setLineBounds(const SkPoint a[2]); | 59 void setCubicBounds(const SkPoint a[4], SkScalar ); |
| 60 void setQuadBounds(const SkPoint a[3]); | 60 void setLineBounds(const SkPoint a[2], SkScalar ); |
| 61 void setQuadBounds(const SkPoint a[3], SkScalar ); |
| 61 | 62 |
| 62 void setPointBounds(const SkPoint& pt) { | 63 void setPointBounds(const SkPoint& pt) { |
| 63 fLeft = fRight = pt.fX; | 64 fLeft = fRight = pt.fX; |
| 64 fTop = fBottom = pt.fY; | 65 fTop = fBottom = pt.fY; |
| 65 } | 66 } |
| 66 | 67 |
| 67 typedef SkRect INHERITED; | 68 typedef SkRect INHERITED; |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 extern void (SkPathOpsBounds::* const SetCurveBounds[])(const SkPoint[]); | 71 extern void (SkPathOpsBounds::* const SetCurveBounds[])(const SkPoint[], SkScala
r weight); |
| 71 | 72 |
| 72 #endif | 73 #endif |
| OLD | NEW |