// Represents an arc along an oval boundary, or a closed wedge of the oval. struct SkArc { enumclass Type : bool {
kArc, // An arc along the perimeter of the oval
kWedge // A closed wedge that includes the oval's center
};
friendbooloperator!=(const SkArc& a, const SkArc& b) { return !(a == b); }
// Preferred factory that explicitly states which type of arc static SkArc Make(const SkRect& oval,
SkScalar startAngleDegrees,
SkScalar sweepAngleDegrees,
Type type) { return SkArc(oval, startAngleDegrees, sweepAngleDegrees, type);
}
// Deprecated factory to assist with legacy code based on `useCenter` static SkArc Make(const SkRect& oval,
SkScalar startAngleDegrees,
SkScalar sweepAngleDegrees, bool useCenter) { return SkArc(
oval, startAngleDegrees, sweepAngleDegrees, useCenter ? Type::kWedge : Type::kArc);
}
// Bounds of oval containing the arc.
SkRect fOval = SkRect::MakeEmpty();
// Angle in degrees where the arc begins. Zero means horizontally to the right.
SkScalar fStartAngle = 0; // Sweep angle in degrees; positive is clockwise.
SkScalar fSweepAngle = 0;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.