APIDrawingdraw_circle

draw_circle

Draws a filled circle on the canvas. Use it for player markers, projectiles, particles, pickups, buttons, and quick debug visuals.

Signature

draw_circle

Draws a circle centered at x and y. The origin is the top-left of the logical canvas, x increases to the right, and y increases downward.

Signature

draw_circle(x: float, y: float, radius: float, color: Color) -> None

Parameters

NameTypeDefaultDescription
xfloatNoneCenter x coordinate in logical canvas pixels.
yfloatNoneCenter y coordinate in logical canvas pixels.
radiusfloatNoneCircle radius in pixels. Use positive values.
colorColorNoneFill color, usually a named constant like RED or a Color instance.

Returns

None

Example

from conjure import *

init_window(360, 640, "Circle")

while not window_should_close():
  begin_drawing()
  clear_background(WHITE)
  draw_circle(180, 320, 40, RED)
  draw_text("Center point", 112, 372, 20, BLACK)
  end_drawing()

See also

  • draw_circle_lines
  • draw_rect
  • draw_text

For a complete loop that moves shapes around, continue with the quickstart or your first game. For rectangles and text, see the drawing overview.