shape ops work in progress
M Intersection/DataTypes.cpp
M Intersection/QuadraticIntersection_Test.cpp
M Intersection/EdgeWalker.cpp
M Intersection/LineQuadraticIntersection_Test.cpp
M Intersection/LineIntersection_Test.cpp
M Intersection/LineIntersection.cpp
D Intersection/edge.xcodeproj
M Intersection/SimplifyFindTop_Test.cpp
M Intersection/DataTypes.h
A Intersection/SimplifyRect4x4_Test.cpp
M Intersection/CubicIntersection_Test.cpp
M Intersection/QuadraticUtilities.h
M Intersection/LineCubicIntersection_Test.cpp
A Intersection/CurveUtilities.h
M Intersection/QuadraticBezierClip.cpp
M Intersection/QuadraticBounds.cpp
M Intersection/LineUtilities.h
M Intersection/Intersection_Tests.cpp
M Intersection/Simplify.cpp
M Intersection/EdgeWalker_TestUtility.cpp
M Intersection/QuadraticUtilities.cpp
M Intersection/thingsToDo.txt
M Intersection/LineUtilities.cpp
M Intersection/CubicUtilities.h
M Intersection/SimplifyFindNext_Test.cpp
M Intersection/Intersection_Tests.h
M Intersection/CubicBezierClip.cpp
M Intersection/ActiveEdge_Test.cpp
M Intersection/CubicBounds.cpp
M Intersection/Simplify.h
M Intersection/SimplifyNew_Test.cpp
M Intersection/EdgeWalker_Test.h
M Intersection/CubicUtilities.cpp
M Intersection/op.htm
M Intersection/ConvexHull.cpp
D Intersection/RectUtilities.cpp
M Intersection/SimplifyAddIntersectingTs_Test.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@4429 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Intersection/EdgeWalker_TestUtility.cpp b/experimental/Intersection/EdgeWalker_TestUtility.cpp
index 2a29648..7e65e8f 100644
--- a/experimental/Intersection/EdgeWalker_TestUtility.cpp
+++ b/experimental/Intersection/EdgeWalker_TestUtility.cpp
@@ -60,7 +60,7 @@
int bitWidth = SkScalarCeil(larger.width()) + 2;
int bitHeight = SkScalarCeil(larger.height()) + 2;
if (bits.width() < bitWidth * 2 || bits.height() < bitHeight) {
- if (bits.width() >= 200) {
+ if (bits.width() >= 200 && false) {
SkDebugf("%s bitWidth=%d bitHeight=%d\n", __FUNCTION__, bitWidth, bitHeight);
}
bits.setConfig(SkBitmap::kARGB_8888_Config, bitWidth * 2, bitHeight);
@@ -192,10 +192,10 @@
const SkRect& bounds2 = two.getBounds();
SkRect larger = bounds1;
larger.join(bounds2);
- SkScalar xScale = std::max(80.0f / larger.width(), 1.0f);
- SkScalar yScale = std::max(60.0f / larger.height(), 1.0f);
+ SkScalar xScale = std::max(32.0f / larger.width(), 1.0f);
+ SkScalar yScale = std::max(24.0f / larger.height(), 1.0f);
errors = scaledDrawTheSame(one, two, xScale, yScale, false, bitmap, canvas);
- if (errors > 50) {
+ if (errors > 5) {
scaledDrawTheSame(one, two, xScale, yScale, true, bitmap, canvas);
}
}
@@ -203,7 +203,7 @@
SkDebugf("\n%s errors=%d\n", __FUNCTION__, errors);
max = errors;
}
- const int MAX_ERRORS = 100;
+ const int MAX_ERRORS = 20;
if (errors > MAX_ERRORS) SkDebugf("\n%s errors=%d\n", __FUNCTION__, errors);
if (errors > MAX_ERRORS && gComparePathsAssert) {
showPath(one);
@@ -256,6 +256,31 @@
return comparePaths(path, out, bitmap, canvas) == 0;
}
+bool testSimplifyx(const SkPath& path, SkPath& out, SkBitmap& bitmap,
+ SkCanvas* canvas) {
+ if (gShowPath) {
+ showPath(path);
+ }
+ simplifyx(path, out);
+ if (!gComparePaths) {
+ return true;
+ }
+ return comparePaths(path, out, bitmap, canvas) == 0;
+}
+
+bool testSimplifyx(const SkPath& path) {
+ if (false) {
+ showPath(path);
+ }
+ SkPath out;
+ simplifyx(path, out);
+ if (false) {
+ return true;
+ }
+ SkBitmap bitmap;
+ return comparePaths(path, out, bitmap, 0) == 0;
+}
+
State4::State4() {
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 150 * 2, 100);
bitmap.allocPixels();