108 {
110 int iIndex = static_cast<int>(index);
118 SkPoint pts[3] = {
conic.fPts.fPts[0].asSkPoint(),
conic.fPts.fPts[1].asSkPoint(),
119 conic.fPts.fPts[2].asSkPoint() };
125 SkDebugf(
"%s [%d] conic verb=%d\n", __FUNCTION__, iIndex, order1);
127 }
129 if (order2 < 2) {
130 SkDebugf(
"%s [%d] line order=%d\n", __FUNCTION__, iIndex, order2);
132 }
134 bool flipped = false;
137 if (intersections.
used() <= 0) {
138 continue;
139 }
140 for (
int pt = 0; pt <
result; ++pt) {
141 double tt1 = intersections[0][pt];
144 double tt2 = intersections[1][pt];
148 SkDebugf(
"%s [%d,%d] x!= t1=%1.9g (%1.9g,%1.9g) t2=%1.9g (%1.9g,%1.9g)\n",
149 __FUNCTION__, iIndex, pt, tt1, t1.
fX, t1.
fY, tt2, t2.
fX, t2.
fY);
151 }
155 SkDebugf(
"%s t1=(%1.9g,%1.9g)\n", __FUNCTION__, t1.
fX, t1.
fY);
157 }
158 }
159 }
160}
static size_t lineConicTests_count
static struct lineConic lineConicTests[]
static int doIntersect(SkIntersections &intersections, const SkDConic &conic, const SkDLine &line, bool &flipped)
bool ValidConic(const SkDConic &conic)
bool ValidLine(const SkDLine &line)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define REPORTER_ASSERT(r, cond,...)
SkDPoint fPts[kPointCount]
void set(const SkPoint pts[3], SkScalar w)
bool approximatelyEqual(const SkDPoint &a) const
static SkPath::Verb Conic(const SkConic &conic, SkPoint *reducePts)
int reduce(const SkDCubic &cubic, Quadratics)