Lines Matching refs:cubic

16 static bool controls_inside(const SkDCubic& cubic) {
17 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX)
18 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX)
19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY)
20 && between(cubic[0].fY, cubic[2].fY, cubic[3].fY);
23 static bool tiny(const SkDCubic& cubic) {
27 if (cubic[minX].fX > cubic[index].fX) {
30 if (cubic[minY].fY > cubic[index].fY) {
33 if (cubic[maxX].fX < cubic[index].fX) {
36 if (cubic[maxY].fY < cubic[index].fY) {
40 return approximately_equal(cubic[maxX].fX, cubic[minX].fX)
41 && approximately_equal(cubic[maxY].fY, cubic[minY].fY);
44 static void find_tight_bounds(const SkDCubic& cubic, SkDRect& bounds) {
45 SkDCubicPair cubicPair = cubic.chopAt(0.5);
109 SkDCubic cubic; in DEF_TEST() local
110 cubic.debugSet(c.fPts); in DEF_TEST()
111 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
112 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
120 SkDCubic cubic; in DEF_TEST() local
121 cubic.debugSet(c.fPts); in DEF_TEST()
122 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
123 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
126 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
132 SkDCubic cubic; in DEF_TEST() local
133 cubic.debugSet(c.fPts); in DEF_TEST()
134 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
135 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
143 SkDCubic cubic; in DEF_TEST() local
144 cubic.debugSet(c.fPts); in DEF_TEST()
145 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
146 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
154 SkDCubic cubic; in DEF_TEST() local
155 cubic.debugSet(c.fPts); in DEF_TEST()
156 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
157 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
165 SkDCubic cubic; in DEF_TEST() local
166 cubic.debugSet(c.fPts); in DEF_TEST()
167 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
168 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
171 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
177 SkDCubic cubic; in DEF_TEST() local
178 cubic.debugSet(c.fPts); in DEF_TEST()
179 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
180 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
191 SkDCubic cubic = quad.debugToCubic(); in DEF_TEST() local
192 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
203 SkDCubic cubic = quad.debugToCubic(); in DEF_TEST() local
204 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
215 SkDCubic cubic = quad.debugToCubic(); in DEF_TEST() local
216 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics); in DEF_TEST()
226 const SkDCubic& cubic = lines[index]; in DEF_TEST()
227 SkASSERT(ValidCubic(cubic)); in DEF_TEST()
228 bool controlsInside = controls_inside(cubic); in DEF_TEST()
229 order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, in DEF_TEST()
236 if ( (reducer.fLine[0].fX != cubic[0].fX && reducer.fLine[0].fX != cubic[3].fX) in DEF_TEST()
237 || (reducer.fLine[0].fY != cubic[0].fY && reducer.fLine[0].fY != cubic[3].fY) in DEF_TEST()
238 || (reducer.fLine[1].fX != cubic[0].fX && reducer.fLine[1].fX != cubic[3].fX) in DEF_TEST()
239 || (reducer.fLine[1].fY != cubic[0].fY && reducer.fLine[1].fY != cubic[3].fY)) { in DEF_TEST()
247 find_tight_bounds(cubic, bounds); in DEF_TEST()