circle()

Shape / 2D Primitives

Description

Draws a circle to the screen. By default, the first two parameters set the location of the center, and the third sets the shape's diameter.

Syntax

void circle(float cx, float cy, float d)

Parameters

NameTypeDescription
cxfloatx-coordinate of the center
cyfloaty-coordinate of the center
dfloatdiameter of the circle

Returns

void

Related

Under the Hood

From Processing.h:

void circle(float,float,float); inline void circle(A x,B y,C d){ _api::circle((float)x,(float)y,(float)d); void circle(float cx, float cy, float d); template<typename A,typename B,typename C,typename=std::enable_if_t<std::is_arithmetic_v<A>&&std::is_arithmetic_v<B>&&std::is_arithmetic_v<C>>> void circle(A cx,B cy,C d){ circle((float)cx,(float)cy,(float)d); inline void circle(float x,float y,float d){ if(PApplet::g_papplet) PApplet::g_papplet->circle(x,y,d); }

Under the Hood

From Processing.cpp:

void PApplet::circle(float cx, float cy, float diameter) { ellipse(cx, cy, diameter, diameter); }