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) -> NoneParameters
| Name | Type | Default | Description |
|---|---|---|---|
x | int | None | x argument for this API call. |
y | int | None | y argument for this API call. |
width | int | None | width argument for this API call. |
height | int | None | height argument for this API call. |
color | Color | None | color argument for this API call. |
Returns
NoneExample
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_circledraw_linedraw_text
Return to the drawing overview or continue with the quickstart.