quad()

Shape / 2D Primitives

Description

Draws a quadrilateral (a four-sided polygon) using the x and y coordinates of its four vertices.

Syntax

void quad(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)

Parameters

NameTypeDescription
x1floatx of first vertex
y1floaty of first vertex
x2floatx of second vertex
y2floaty of second vertex
x3floatx of third vertex
y3floaty of third vertex
x4floatx of fourth vertex
y4floaty of fourth vertex

Returns

void

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...