APIDrawingdraw_rectangle

draw_rectangle

Draws a filled rectangle.

Signature

draw_rectangle

Draws a filled rectangle.

Signature

draw_rectangle(x: int, y: int, width: int, height: int, color: Color) -> None

Parameters

NameTypeDefaultDescription
xintNonex argument for this API call.
yintNoney argument for this API call.
widthintNonewidth argument for this API call.
heightintNoneheight argument for this API call.
colorColorNonecolor argument for this API call.

Returns

None

Example

from conjure import *

init_window(360, 640, "API")
while not window_should_close():
    begin_drawing()
    clear_background(WHITE)
    draw_text("Moosh", 120, 300, 28, BLACK)
    end_drawing()

See also

  • draw_circle
  • draw_line
  • draw_text

Return to the drawing overview or continue with the quickstart.