Lines Matching refs:oval
230 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, in arc_is_lone_point() argument
236 pt->set(oval.fRight, oval.centerY()); in arc_is_lone_point()
238 } else if (0 == oval.width() && 0 == oval.height()) { in arc_is_lone_point()
245 pt->set(oval.fRight, oval.fTop); in arc_is_lone_point()
291 static int build_arc_conics(const SkRect& oval, const SkVector& start, const SkVector& stop, in build_arc_conics() argument
296 matrix.setScale(SkScalarHalf(oval.width()), SkScalarHalf(oval.height())); in build_arc_conics()
297 matrix.postTranslate(oval.centerX(), oval.centerY()); in build_arc_conics()
311 SkPathBuilder& SkPathBuilder::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, in arcTo() argument
313 if (oval.width() < 0 || oval.height() < 0) { in arcTo()
322 if (arc_is_lone_point(oval, startAngle, sweepAngle, &lonePt)) { in arcTo()
348 SkScalar radiusX = oval.width() / 2; in arcTo()
349 SkScalar radiusY = oval.height() / 2; in arcTo()
353 singlePt.set(oval.centerX() + radiusX * SkScalarCos(endAngle), in arcTo()
354 oval.centerY() + radiusY * SkScalarSin(endAngle)); in arcTo()
360 int count = build_arc_conics(oval, startV, stopV, dir, conics, &singlePt); in arcTo()
374 SkPathBuilder& SkPathBuilder::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) { in addArc() argument
375 if (oval.isEmpty() || 0 == sweepAngle) { in addArc()
391 … return this->addOval(oval, sweepAngle > 0 ? SkPathDirection::kCW : SkPathDirection::kCCW, in addArc()
395 return this->arcTo(oval, startAngle, sweepAngle, true); in addArc()
610 OvalPointIterator(const SkRect& oval, SkPathDirection dir, unsigned startIndex) in OvalPointIterator() argument
613 const SkScalar cx = oval.centerX(); in OvalPointIterator()
614 const SkScalar cy = oval.centerY(); in OvalPointIterator()
616 fPts[0] = SkPoint::Make(cx, oval.fTop); in OvalPointIterator()
617 fPts[1] = SkPoint::Make(oval.fRight, cy); in OvalPointIterator()
618 fPts[2] = SkPoint::Make(cx, oval.fBottom); in OvalPointIterator()
619 fPts[3] = SkPoint::Make(oval.fLeft, cy); in OvalPointIterator()
661 SkPathBuilder& SkPathBuilder::addOval(const SkRect& oval, SkPathDirection dir, unsigned index) { in addOval() argument
668 OvalPointIterator ovalIter(oval, dir, index); in addOval()
669 RectPointIterator rectIter(oval, dir, index + (dir == SkPathDirection::kCW ? 0 : 1)); in addOval()