Format more consistently with the rest of Skia.
git-svn-id: http://skia.googlecode.com/svn/trunk@106 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkCubicClipper.cpp b/src/core/SkCubicClipper.cpp
index d11eb99..6e47513 100644
--- a/src/core/SkCubicClipper.cpp
+++ b/src/core/SkCubicClipper.cpp
@@ -77,7 +77,7 @@
#else // BISECTION // Linear convergence, typically 16 iterations.
// Check that the endpoints straddle zero.
- SkScalar tNeg, tPos; // Parameter where the function is negative and positive, respectively.
+ SkScalar tNeg, tPos; // Negative and positive function parameters.
if (ycrv[0] < 0) {
if (ycrv[3] < 0)
return false;
@@ -92,7 +92,7 @@
*t = 0;
return true;
}
-
+
const SkScalar tol = SK_Scalar1 / 65536; // 1 for fixed, 1e-5 for float.
int iters = 0;
do {
@@ -139,10 +139,10 @@
if (dst[3].fY <= ctop || dst[0].fY >= cbot) {
return false;
}
-
+
SkScalar t;
SkPoint tmp[7]; // for SkChopCubicAt
-
+
// are we partially above
if (dst[0].fY < ctop && chopMonoCubicAtY(dst, ctop, &t)) {
SkChopCubicAt(dst, tmp, t);
@@ -150,7 +150,7 @@
dst[1] = tmp[4];
dst[2] = tmp[5];
}
-
+
// are we partially below
if (dst[3].fY > cbot && chopMonoCubicAtY(dst, cbot, &t)) {
SkChopCubicAt(dst, tmp, t);
@@ -158,7 +158,7 @@
dst[2] = tmp[2];
dst[3] = tmp[3];
}
-
+
if (reverse) {
SkTSwap<SkPoint>(dst[0], dst[3]);
SkTSwap<SkPoint>(dst[1], dst[2]);
diff --git a/src/core/SkCubicClipper.h b/src/core/SkCubicClipper.h
index 546abae..9a45b31 100644
--- a/src/core/SkCubicClipper.h
+++ b/src/core/SkCubicClipper.h
@@ -22,14 +22,14 @@
/** This class is initialized with a clip rectangle, and then can be fed cubics,
which must already be monotonic in Y.
-
+
In the future, it might return a series of segments, allowing it to clip
also in X, to ensure that all segments fit in a finite coordinate system.
*/
class SkCubicClipper {
public:
SkCubicClipper();
-
+
void setClip(const SkIRect& clip);
bool clipCubic(const SkPoint src[4], SkPoint dst[4]);