Index: samplecode/SampleConcavePaths.cpp |
diff --git a/samplecode/SampleConcavePaths.cpp b/samplecode/SampleConcavePaths.cpp |
index fb5447efc76673c3af946af4eeedcf4013262f5b..de8389ab780b350989ce1f3ee4b3681e7a2839fc 100644 |
--- a/samplecode/SampleConcavePaths.cpp |
+++ b/samplecode/SampleConcavePaths.cpp |
@@ -135,6 +135,50 @@ protected: |
canvas->drawPath(path, paint); |
canvas->restore(); |
} |
+ if (1) { |
+ SkPath path; |
+ canvas->save(); |
+ canvas->translate(300, 100); |
+ path.moveTo(30, 20); |
+ path.lineTo(50, 80); |
+ path.lineTo(70, 20); |
+ path.lineTo(20, 57); |
+ path.lineTo(80, 57); |
+ path.close(); |
+ canvas->drawPath(path, paint); |
+ canvas->restore(); |
+ } |
+ // Quadratic path test. |
+ if (1) { |
+ SkPath path; |
+ canvas->save(); |
+ canvas->translate(0, 200); |
+ path.moveTo(SkIntToScalar(20), SkIntToScalar(50)); |
+ path.quadTo(SkIntToScalar(50), SkIntToScalar(50), SkIntToScalar(50), SkIntToScalar(20)); |
+ path.lineTo(SkIntToScalar(80), SkIntToScalar(20)); |
+ path.lineTo(SkIntToScalar(80), SkIntToScalar(80)); |
+ path.lineTo(SkIntToScalar(20), SkIntToScalar(80)); |
+ canvas->drawPath(path, paint); |
+ canvas->restore(); |
+ } |
+ // Cubic path test. |
+ if (1) { |
+ SkPath path; |
+ canvas->save(); |
+ canvas->translate(100, 200); |
+ path.moveTo(SkIntToScalar(20), SkIntToScalar(50)); |
+// path.cubicTo(SkIntToScalar(20), SkIntToScalar(20), |
+// SkIntToScalar(70), SkIntToScalar(70), |
+// SkIntToScalar(50), SkIntToScalar(20)); |
+ path.cubicTo(SkIntToScalar(60), SkIntToScalar(40), |
+ SkIntToScalar(-20), SkIntToScalar(30), |
+ SkIntToScalar(50), SkIntToScalar(20)); |
+ path.lineTo(SkIntToScalar(80), SkIntToScalar(20)); |
+ path.lineTo(SkIntToScalar(80), SkIntToScalar(80)); |
+ path.lineTo(SkIntToScalar(20), SkIntToScalar(80)); |
+ canvas->drawPath(path, paint); |
+ canvas->restore(); |
+ } |
} |
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, |