Home | History | Annotate | Download | only in pathops

Lines Matching defs:Quad

16 static int coincident_line(const SkDQuad& quad, SkDQuad& reduction) {
17 reduction[0] = reduction[1] = quad[0];
25 static int vertical_line(const SkDQuad& quad, SkDQuad& reduction) {
26 reduction[0] = quad[0];
27 reduction[1] = quad[2];
31 static int horizontal_line(const SkDQuad& quad, SkDQuad& reduction) {
32 reduction[0] = quad[0];
33 reduction[1] = quad[2];
37 static int check_linear(const SkDQuad& quad,
41 while (quad[startIndex].approximatelyEqual(quad[endIndex])) {
48 if (!quad.isLinear(startIndex, endIndex)) {
52 reduction[0] = quad[0];
53 reduction[1] = quad[2];
63 int SkReduceOrder::reduce(const SkDQuad& quad) {
69 if (quad[minX].fX > quad[index].fX) {
72 if (quad[minY].fY > quad[index].fY) {
75 if (quad[maxX].fX < quad[index].fX) {
78 if (quad[maxY].fY < quad[index].fY) {
83 if (AlmostEqualUlps(quad[index].fX, quad[minX].fX)) {
86 if (AlmostEqualUlps(quad[index].fY, quad[minY].fY)) {
92 return coincident_line(quad, fQuad);
94 return vertical_line(quad, fQuad);
97 return horizontal_line(quad, fQuad);
99 int result = check_linear(quad, minX, maxX, minY, maxY, fQuad);
103 fQuad = quad;
261 SkPath::Verb SkReduceOrder::Quad(const SkPoint a[3], SkPoint* reducePts) {
262 SkDQuad quad;
263 quad.set(a);
265 int order = reducer.reduce(quad);
266 if (order == 2) { // quad became line
279 if (order == 2 || order == 3) { // cubic became line or quad