Lines Matching defs:oval

846 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
850 // treated as a special case the moves can distort the oval's
852 pt->set(oval.fRight, oval.centerY());
854 } else if (0 == oval.width() && 0 == oval.height()) {
861 pt->set(oval.fRight, oval.fTop);
907 static int build_arc_conics(const SkRect& oval, const SkVector& start, const SkVector& stop,
912 matrix.setScale(SkScalarHalf(oval.width()), SkScalarHalf(oval.height()));
913 matrix.postTranslate(oval.centerX(), oval.centerY());
944 // degenerate(oval) => line points are collapsing
1038 SkPath& SkPath::addOval(const SkRect& oval, SkPathDirection dir) {
1040 return this->addOval(oval, dir, 1);
1043 SkPath& SkPath::addOval(const SkRect &oval, SkPathDirection dir, unsigned startPointIndex) {
1047 this path is still marked as an oval. This is used to
1060 SkAutoPathBoundsUpdate apbu(this, oval);
1066 SkPath_OvalPointIterator ovalIter(oval, dir, startPointIndex);
1067 // The corner iterator pts are tracking "behind" the oval/radii pts.
1068 SkPath_RectPointIterator rectIter(oval, dir, startPointIndex + (dir == SkPathDirection::kCW ? 0 : 1));
1092 SkPath& SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1094 if (oval.width() < 0 || oval.height() < 0) {
1103 if (arc_is_lone_point(oval, startAngle, sweepAngle, &lonePt)) {
1115 // arcs from the same oval.
1132 SkScalar radiusX = oval.width() / 2;
1133 SkScalar radiusY = oval.height() / 2;
1137 singlePt.set(oval.centerX() + radiusX * SkScalarCos(endAngle),
1138 oval.centerY() + radiusY * SkScalarSin(endAngle));
1144 int count = build_arc_conics(oval, startV, stopV, dir, conics, &singlePt);
1303 SkPath& SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1304 if (oval.isEmpty() || 0 == sweepAngle) {
1311 // We can treat the arc as an oval if it begins at one of our legal starting positions.
1320 return this->addOval(oval, sweepAngle > 0 ? SkPathDirection::kCW : SkPathDirection::kCCW,
1324 return this->arcTo(oval, startAngle, sweepAngle, true);
3227 // This gets converted to an oval.
3239 void SkPathPriv::CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
3241 SkASSERT(!oval.isEmpty());
3252 path->addOval(oval);
3257 path->moveTo(oval.centerX(), oval.centerY());
3265 path->arcTo(oval, startAngle, -180.f, forceMoveTo);
3267 path->arcTo(oval, startAngle, -180.f, false);
3273 path->arcTo(oval, startAngle, 180.f, forceMoveTo);
3275 path->arcTo(oval, startAngle, 180.f, false);
3280 path->arcTo(oval, startAngle, sweepAngle, forceMoveTo);