Lines Matching refs:oval

932     OvalPointIterator(const SkRect& oval, SkPath::Direction dir, unsigned startIndex)
935 const SkScalar cx = oval.centerX();
936 const SkScalar cy = oval.centerY();
938 fPts[0] = SkPoint::Make(cx, oval.fTop);
939 fPts[1] = SkPoint::Make(oval.fRight, cy);
940 fPts[2] = SkPoint::Make(cx, oval.fBottom);
941 fPts[3] = SkPoint::Make(oval.fLeft, cy);
1033 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1037 // treated as a special case the moves can distort the oval's
1039 pt->set(oval.fRight, oval.centerY());
1041 } else if (0 == oval.width() && 0 == oval.height()) {
1048 pt->set(oval.fRight, oval.fTop);
1089 static int build_arc_conics(const SkRect& oval, const SkVector& start, const SkVector& stop,
1094 matrix.setScale(SkScalarHalf(oval.width()), SkScalarHalf(oval.height()));
1095 matrix.postTranslate(oval.centerX(), oval.centerY());
1130 // degenerate(oval) => line points are collapsing
1223 void SkPath::addOval(const SkRect& oval, Direction dir) {
1225 this->addOval(oval, dir, 1);
1228 void SkPath::addOval(const SkRect &oval, Direction dir, unsigned startPointIndex) {
1232 this path is still marked as an oval. This is used to
1245 SkAutoPathBoundsUpdate apbu(this, oval);
1251 OvalPointIterator ovalIter(oval, dir, startPointIndex);
1252 // The corner iterator pts are tracking "behind" the oval/radii pts.
1253 RectPointIterator rectIter(oval, dir, startPointIndex + (dir == kCW_Direction ? 0 : 1));
1275 void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1277 if (oval.width() < 0 || oval.height() < 0) {
1286 if (arc_is_lone_point(oval, startAngle, sweepAngle, &lonePt)) {
1302 SkScalar radiusX = oval.width() / 2;
1303 SkScalar radiusY = oval.height() / 2;
1309 singlePt.set(oval.centerX() + radiusX * sk_float_cos(endAngle),
1310 oval.centerY() + radiusY * sk_float_sin(endAngle));
1316 int count = build_arc_conics(oval, startV, stopV, dir, conics, &singlePt);
1439 void SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1440 if (oval.isEmpty() || 0 == sweepAngle) {
1447 // We can treat the arc as an oval if it begins at one of our legal starting positions.
1456 this->addOval(oval, sweepAngle > 0 ? kCW_Direction : kCCW_Direction,
1461 this->arcTo(oval, startAngle, sweepAngle, true);
3363 void SkPathPriv::CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
3365 SkASSERT(!oval.isEmpty());
3372 path->addOval(oval);
3376 path->moveTo(oval.centerX(), oval.centerY());
3381 path->arcTo(oval, startAngle, -180.f, forceMoveTo);
3383 path->arcTo(oval, startAngle, -180.f, false);
3389 path->arcTo(oval, startAngle, 180.f, forceMoveTo);
3391 path->arcTo(oval, startAngle, 180.f, false);
3396 path->arcTo(oval, startAngle, sweepAngle, forceMoveTo);