| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "Test.h" | 8 #include "Test.h" |
| 9 | 9 |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 canvas.clear(SK_ColorTRANSPARENT); | 23 canvas.clear(SK_ColorTRANSPARENT); |
| 24 | 24 |
| 25 SkPath path; | 25 SkPath path; |
| 26 path.moveTo(0, 0); path.lineTo(1, 0); path.lineTo(33, 1); | 26 path.moveTo(0, 0); path.lineTo(1, 0); path.lineTo(33, 1); |
| 27 SkPaint paint; | 27 SkPaint paint; |
| 28 paint.setAntiAlias(true); | 28 paint.setAntiAlias(true); |
| 29 canvas.drawPath(path, paint); | 29 canvas.drawPath(path, paint); |
| 30 } | 30 } |
| 31 | 31 |
| 32 static void PrintCurve(const char *name, const SkPoint crv[4]) { | 32 static void PrintCurve(const char *name, const SkPoint crv[4]) { |
| 33 printf("%s: %.10g, %.10g, %.10g, %.10g, %.10g, %.10g, %.10g, %.10g\n", | 33 SkDebugf("%s: %.10g, %.10g, %.10g, %.10g, %.10g, %.10g, %.10g, %.10g\n", |
| 34 name, | 34 name, |
| 35 (float)crv[0].fX, (float)crv[0].fY, | 35 (float)crv[0].fX, (float)crv[0].fY, |
| 36 (float)crv[1].fX, (float)crv[1].fY, | 36 (float)crv[1].fX, (float)crv[1].fY, |
| 37 (float)crv[2].fX, (float)crv[2].fY, | 37 (float)crv[2].fX, (float)crv[2].fY, |
| 38 (float)crv[3].fX, (float)crv[3].fY); | 38 (float)crv[3].fX, (float)crv[3].fY); |
| 39 | 39 |
| 40 } | 40 } |
| 41 | 41 |
| 42 | 42 |
| 43 static bool CurvesAreEqual(const SkPoint c0[4], | 43 static bool CurvesAreEqual(const SkPoint c0[4], |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 shouldbe), tol)); | 162 shouldbe), tol)); |
| 163 | 163 |
| 164 test_giantClip(); | 164 test_giantClip(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 | 167 |
| 168 | 168 |
| 169 | 169 |
| 170 #include "TestClassDef.h" | 170 #include "TestClassDef.h" |
| 171 DEFINE_TESTCLASS("CubicClipper", CubicClippingTestClass, TestCubicClipping) | 171 DEFINE_TESTCLASS("CubicClipper", CubicClippingTestClass, TestCubicClipping) |
| OLD | NEW |