APIDrawingdraw_text

draw_text

Draws text with the default runtime font.

Signature

draw_text

Draws text with the default runtime font.

Signature

draw_text(text: str, x: int, y: int, size: int, color: Color) -> None

Parameters

NameTypeDefaultDescription
textstrNonetext argument for this API call.
xintNonex argument for this API call.
yintNoney argument for this API call.
sizeintNonesize 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_rectangle
  • draw_line

Return to the drawing overview or continue with the quickstart.