q5play
    Preparing search index...

    Function arc

    • 🖌 Draws an arc, which is a section of an ellipse.

      ellipseMode affects how the arc is drawn.

      q5 WebGPU only supports the default PIE_OPEN mode.

      Parameters

      • x: number

        x-coordinate

      • y: number

        y-coordinate

      • w: number

        width of the ellipse

      • h: number

        height of the ellipse

      • start: number

        angle to start the arc

      • stop: number

        angle to stop the arc

      • Optionalmode: number

        shape and stroke style setting, default is PIE_OPEN for a pie shape with an unclosed stroke, can be PIE, CHORD, or CHORD_OPEN

      Returns void

      await Canvas(200);
      background(0.8);

      arc(0, 0, 160, 160, 0.8, -0.8);