Home | History | Annotate | Download | only in core

Lines Matching refs:pts

236 static bool quad_in_bounds(const SkScalar* pts, const SkScalar bounds[2]) {
237 SkScalar min = SkTMin(SkTMin(pts[0], pts[2]), pts[4]);
241 SkScalar max = SkTMax(SkTMax(pts[0], pts[2]), pts[4]);
245 static bool cubic_in_bounds(const SkScalar* pts, const SkScalar bounds[2]) {
246 SkScalar min = SkTMin(SkTMin(SkTMin(pts[0], pts[2]), pts[4]), pts[6]);
250 SkScalar max = SkTMax(SkTMax(SkTMax(pts[0], pts[2]), pts[4]), pts[6]);
270 void SkGlyphCache::AddPoints(const SkPoint* pts, int ptCount, const SkScalar bounds[2],
273 SkScalar val = *(&pts[i].fY - yAxis);
275 AddInterval(*(&pts[i].fX + yAxis), intercept);
280 void SkGlyphCache::AddLine(const SkPoint pts[2], SkScalar axis, bool yAxis,
282 SkScalar t = yAxis ? (axis - pts[0].fX) / (pts[1].fX - pts[0].fX)
283 : (axis - pts[0].fY) / (pts[1].fY - pts[0].fY);
285 AddInterval(yAxis ? pts[0].fY + t * (pts[1].fY - pts[0].fY)
286 : pts[0].fX + t * (pts[1].fX - pts[0].fX), intercept);
290 void SkGlyphCache::AddQuad(const SkPoint pts[2], SkScalar axis, bool yAxis,
293 quad.set(pts);
303 void SkGlyphCache::AddCubic(const SkPoint pts[3], SkScalar axis, bool yAxis,
306 cubic.set(pts);
356 SkPoint pts[4];
358 while (SkPath::kDone_Verb != (verb = iter.next(pts))) {
363 AddLine(pts, bounds[0], yAxis, intercept);
364 AddLine(pts, bounds[1], yAxis, intercept);
365 AddPoints(pts, 2, bounds, yAxis, intercept);
368 if (!quad_in_bounds(&pts[0].fY - yAxis, bounds)) {
371 AddQuad(pts, bounds[0], yAxis, intercept);
372 AddQuad(pts, bounds[1], yAxis, intercept);
373 AddPoints(pts, 3, bounds, yAxis, intercept);
379 if (!cubic_in_bounds(&pts[0].fY - yAxis, bounds)) {
382 AddCubic(pts, bounds[0], yAxis, intercept);
383 AddCubic(pts, bounds[1], yAxis, intercept);
384 AddPoints(pts, 4, bounds, yAxis, intercept);