Documentation
    Preparing search index...

    Interface PathArcCommand

    A circular or elliptical arc (§51 "circular and elliptical arc"), in centre parameterization: the point at angle θ is centre + R(rotation) · (radiusX·cos θ, radiusY·sin θ).

    The command stores a signed sweep rather than the end angle the builder was given. Two different (startAngle, endAngle, counterclockwise) triples can describe the same arc — (0, π) and (0, −π, true) differ, (0, 3π) and (0, π) do not — and a model that kept the raw triple would have to re-derive the sweep in every operation that touches an arc. Path.arc and Path.ellipse normalize once, here, into |deltaAngle| ≤ 2π; reversing an arc negates it, splitting one halves it.

    When the current point is not the arc's start point, the arc contributes an implicit straight segment to it first — the Canvas rule, and the one that makes a rounded rectangle expressible as alternating lines and arcs.

    interface PathArcCommand {
        centerX: number;
        centerY: number;
        deltaAngle: number;
        kind: "arc";
        radiusX: number;
        radiusY: number;
        rotation: number;
        startAngle: number;
    }
    Index
    centerX: number

    Horizontal coordinate of the ellipse's centre.

    centerY: number

    Vertical coordinate of the ellipse's centre.

    deltaAngle: number

    Signed sweep in radians, −2π … 2π. Positive sweeps counter-clockwise in the Y-up plane (§7a).

    kind: "arc"
    radiusX: number

    Semi-axis along the ellipse's local X axis. Always positive.

    radiusY: number

    Semi-axis along the ellipse's local Y axis. Always positive.

    rotation: number

    Rotation of the ellipse's local axes about its centre, in radians (§7b).

    startAngle: number

    Angle of the arc's first point, in the ellipse's local frame, in radians.