Loading

Parc

processing

Draws an arc to the screen. Arcs are drawn along the outer edge of an ellipse defined by the a, b, c, and d parameters. The origin of the arc's ellipse may be changed with the PellipseMode function. Use the start and stop parameters to specify the angles (in radians) at which to draw the arc.

There are three ways to draw an arc; the rendering technique used is defined by the optional seventh parameter. The three options, depicted in the examples, are PIE, OPEN, and CHORD. The default mode is the OPEN stroke with a PIE fill.

In some cases, the Parc function isn't accurate enough for smooth drawing. For example, the shape may jitter on screen when rotating slowly. If you're having an issue with how arcs are rendered, you'll need to draw the arc yourself with PbeginShape/PendShape or a PShape.

Link to original Processing doc

Parc is available since version 1.0.0.

See also

Signatures

Examples

// @preview image PI 2 / 'HALF_PI' STORE PI 4 / 'QUARTER_PI' STORE PI 2 * 'TWO_PI' STORE 400 120 '2D3' PGraphics 255 Pbackground 0x7fff0000 Pfill //red half transparent 0xff0000ff Pstroke //blue 50 55 50 50 0 $HALF_PI Parc PnoFill 50 55 60 60 $HALF_PI PI Parc 50 55 70 70 PI PI $QUARTER_PI + Parc 50 55 80 80 PI $QUARTER_PI + $TWO_PI Parc 2 PstrokeWeight 0x7fff0000 Pfill //red half transparent 150 50 80 80 0 PI $QUARTER_PI + 'OPEN' Parc 'OPEN' 150 110 Ptext 250 50 80 80 0 PI $QUARTER_PI + 'CHORD' Parc 'CHORD' 250 110 Ptext 350 50 80 80 0 PI $QUARTER_PI + 'PIE' Parc 'PIE' 350 110 Ptext Pencode