79 {
85 };
86
88 SkPoint clipped[4], shouldbe[4];
90 bool success;
91 const float tol = 1e-4f;
92
93
96 success = clipper.
clipCubic(crv, clipped);
99 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol));
100
101
104 success = clipper.
clipCubic(crv, clipped);
107 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol));
108
109
112 success = clipper.
clipCubic(crv, clipped);
115 0, 0, 2, 3, 1, 10, 4, 12, shouldbe), tol));
116
117
120 success = clipper.
clipCubic(crv, clipped);
122
123
126 success = clipper.
clipCubic(crv, clipped);
129 0.5126125216f, 1,
130 1.841195941f, 4.337081432f,
131 1.297019958f, 10.19801331f,
132 4, 12,
133 shouldbe), tol));
134
135
138 success = clipper.
clipCubic(crv, clipped);
141 00.8412352204f, 2,
142 1.767683744f, 5.400758266f,
143 1.55052948f, 10.36701965f,
144 4, 12,
145 shouldbe), tol));
146
147
150 success = clipper.
clipCubic(crv, clipped);
153 0, 0,
154 1.742904663f, 2.614356995f,
155 1.207521796f, 8.266430855f,
156 3.026495695f, 11,
157 shouldbe), tol));
158
159
162 success = clipper.
clipCubic(crv, clipped);
165 0, 0,
166 1.551193237f, 2.326789856f,
167 1.297736168f, 7.059780121f,
168 2.505550385f, 10,
169 shouldbe), tol));
170
172}
static bool CurvesAreEqual(const SkPoint c0[4], const SkPoint c1[4], float tol)
static SkPoint * SetCurve(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, SkPoint crv[4])
static void test_giantClip()
#define REPORTER_ASSERT(r, cond,...)
bool clipCubic(const SkPoint src[4], SkPoint dst[4])
void setClip(const SkIRect &clip)
clipRect(r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw