Lines Matching refs:oval

247 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
251 // treated as a special case the moves can distort the oval's
253 pt->set(oval.fRight, oval.centerY());
255 } else if (0 == oval.width() && 0 == oval.height()) {
262 pt->set(oval.fRight, oval.fTop);
308 static int build_arc_conics(const SkRect& oval, const SkVector& start, const SkVector& stop,
313 matrix.setScale(SkScalarHalf(oval.width()), SkScalarHalf(oval.height()));
314 matrix.postTranslate(oval.centerX(), oval.centerY());
328 SkPathBuilder& SkPathBuilder::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
330 if (oval.width() < 0 || oval.height() < 0) {
339 if (arc_is_lone_point(oval, startAngle, sweepAngle, &lonePt)) {
351 // arcs from the same oval.
365 SkScalar radiusX = oval.width() / 2;
366 SkScalar radiusY = oval.height() / 2;
370 singlePt.set(oval.centerX() + radiusX * SkScalarCos(endAngle),
371 oval.centerY() + radiusY * SkScalarSin(endAngle));
377 int count = build_arc_conics(oval, startV, stopV, dir, conics, &singlePt);
391 SkPathBuilder& SkPathBuilder::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
392 if (oval.isEmpty() || 0 == sweepAngle) {
399 // We can treat the arc as an oval if it begins at one of our legal starting positions.
408 return this->addOval(oval, sweepAngle > 0 ? SkPathDirection::kCW : SkPathDirection::kCCW,
412 return this->arcTo(oval, startAngle, sweepAngle, true);
627 OvalPointIterator(const SkRect& oval, SkPathDirection dir, unsigned startIndex)
630 const SkScalar cx = oval.centerX();
631 const SkScalar cy = oval.centerY();
633 fPts[0] = SkPoint::Make(cx, oval.fTop);
634 fPts[1] = SkPoint::Make(oval.fRight, cy);
635 fPts[2] = SkPoint::Make(cx, oval.fBottom);
636 fPts[3] = SkPoint::Make(oval.fLeft, cy);
678 SkPathBuilder& SkPathBuilder::addOval(const SkRect& oval, SkPathDirection dir, unsigned index) {
685 OvalPointIterator ovalIter(oval, dir, index);
686 RectPointIterator rectIter(oval, dir, index + (dir == SkPathDirection::kCW ? 0 : 1));
688 // The corner iterator pts are tracking "behind" the oval/radii pts.
712 // degenerate(oval) => line points are collapsing