GSDP:GAM100/CProcessing/circle()

circle()

Description

This is a simplified version of ellipse() . A circle can be drawn on the screen using this function. The mode for drawing a circle and ellipse can be changed with ellipseMode() .

Parameters

circle(x, y, r)

  • x - (float) the horizontal position of the circle
  • y - (float) the vertical position of the circle
  • r - (float) the uniform radius of the circle by default


Example

void update() 
{
    // set the background color
    background(color(255, 40, 200, 255));

    //draw a circle at (100, 100)
    circle(100, 100, 50.0f);
     
    // draw a circle at the mouse position
    circle(mouseX, mouseY, 20.0f);
}

Related