+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "Simplify.h"
namespace UnitTest {
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersection_Tests.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
// http://metamerist.com/cbrt/CubeRoot.cpp
//
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "LineParameters.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CubicIntersection_TestData.h"
#include "Intersection_Tests.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "Extrema.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersections.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "CubicIntersection_TestData.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#define IN_TEST 1
#include "CubicIntersection_TestData.h"
#include <limits>
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#if !defined(IN_TEST)
#define IN_TEST 1
#endif
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CubicUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include <vector>
/* Given:
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersection_Tests.h"
#include "Parameterization_Test.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Extrema.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CubicIntersection_TestData.h"
#include "Intersection_Tests.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CubicUtilities.h"
#include "DataTypes.h"
#include "QuadraticUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
double cube_root(double x);
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef CurveIntersection_DEFINE
#define CurveIntersection_DEFINE
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
#include <sys/types.h>
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef __DataTypes_h__
#define __DataTypes_h__
SkSampleView() {
this->setVisibleP(true);
this->setClipToBounds(false);
+ useOld = true;
};
protected:
virtual void onDraw(SkCanvas* canvas) {
static int step = 0; // useNew triggers error at 23275
// error is not easy to debug in its current state
static double seconds;
- static bool useOld = false;
if (step == -1) {
timeval t;
gettimeofday(&t, NULL);
inval(NULL);
}
}
+
+ virtual Click* onFindClickHandler(SkScalar , SkScalar ) {
+ useOld ^= true;
+ return NULL;
+ }
+
private:
+ bool useOld;
typedef SkView INHERITED;
};
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
-
-
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "ShapeOps.h"
#include "SkBitmap.h"
#include "SkStream.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"
#include "SkBitmap.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
#include "Extrema.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
int findExtrema(double a, double b, double c, double d, double tValues[2]);
int findExtrema(double a, double b, double c, double tValue[1]);
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersection_Tests.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#if 0
// snippets that one day may be useful, unused for now...
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
// inline utilities
/* Returns 0 if negative, 1 if zero, 2 if positive
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CubicIntersection_TestData.h"
#include "Intersection_Tests.h"
#include "SkTypes.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#if !defined(IN_TEST)
#define IN_TEST 1
#endif
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef Intersections_DEFINE
#define Intersections_DEFINE
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CubicUtilities.h"
#include "Intersections.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "Intersection_Tests.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersections.h"
#include "LineIntersection.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef LineIntersection_DEFINE
#define LineIntersection_DEFINE
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveUtilities.h"
#include "Intersection_Tests.h"
#include "LineIntersection.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
/* This rejects coincidence with two muls, two adds, and one cmp.
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
// Sources
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "Intersection_Tests.h"
#include "LineParameters.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersections.h"
#include "LineUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "EdgeWalker_Test.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "LineUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
bool implicitLine(const _Line& line, double& slope, double& axisIntercept);
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
// utilities used only for unit testing
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "LineParameters.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersection_Tests.h"
#include "QuadraticIntersection_TestData.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "Extrema.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersections.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "CurveUtilities.h"
#include "Intersection_Tests.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#if !defined(IN_TEST)
#define IN_TEST 1
#endif
--- /dev/null
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include "QuadraticLineSegments.h"
+
--- /dev/null
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "QuadraticUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersection_Tests.h"
#include "Parameterization_Test.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Extrema.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "Intersection_Tests.h"
#include "QuadraticIntersection_TestData.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "IntersectionUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "QuadraticUtilities.h"
#include <math.h>
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
void dxdy_at_t(const Quadratic& , double t, double& x, double& y);
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "SkPath.h"
void contourBounds(const SkPath& path, SkTDArray<SkRect>& boundsArray);
#include "Simplify.cpp"
} // end of SimplifyAddIntersectingTsTest namespace
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "Intersection_Tests.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef TSearch_DEFINED
#define TSearch_DEFINED
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "CurveIntersection.h"
#include "TestUtilities.h"
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#include "DataTypes.h"
bool controls_inside(const Cubic& );
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
add unit test for quadratic horizontal intersection
add unit test for cubic horizontal intersection with left/right
add unit test for ActiveEdge::calcLeft (can currently loop forever)
'../experimental/Intersection/QuadraticBezierClip.cpp',
'../experimental/Intersection/QuadraticBounds.cpp',
'../experimental/Intersection/QuadraticIntersection.cpp',
+ '../experimental/Intersection/QuadraticLineSegments.cpp',
+ '../experimental/Intersection/QuadraticParameterization.cpp',
'../experimental/Intersection/QuadraticReduceOrder.cpp',
'../experimental/Intersection/QuadraticSubDivide.cpp',
'../experimental/Intersection/QuadraticUtilities.cpp',
'../experimental/Intersection/LineIntersection.h',
'../experimental/Intersection/LineParameters.h',
'../experimental/Intersection/LineUtilities.h',
- '../experimental/Intersection/QuadraticParameterization.cpp',
- '../experimental/Intersection/QuadraticSubDivide.cpp',
+ '../experimental/Intersection/QuadraticLineSegments.h',
'../experimental/Intersection/QuadraticUtilities.h',
'../experimental/Intersection/ShapeOps.h',
'../experimental/Intersection/Simplify.h',
'../experimental/Intersection/QuadraticIntersection.cpp',
'../experimental/Intersection/QuadraticIntersection_Test.cpp',
'../experimental/Intersection/QuadraticIntersection_TestData.cpp',
+ '../experimental/Intersection/QuadraticLineSegments.cpp',
'../experimental/Intersection/QuadraticParameterization.cpp',
'../experimental/Intersection/QuadraticParameterization_Test.cpp',
'../experimental/Intersection/QuadraticReduceOrder.cpp',
'../experimental/Intersection/LineUtilities.h',
'../experimental/Intersection/Parameterization_Test.h',
'../experimental/Intersection/QuadraticIntersection_TestData.h',
+ '../experimental/Intersection/QuadraticLineSegments.h',
'../experimental/Intersection/QuadraticUtilities.h',
'../experimental/Intersection/ShapeOps.h',
'../experimental/Intersection/Simplify.h',