draw_line
Draws a straight line segment.
Signature
draw_line
Draws a straight line segment.Signature
draw_line(start_x: int, start_y: int, end_x: int, end_y: int, color: Color, thickness: int = 1) -> NoneParameters
| Name | Type | Default | Description |
|---|---|---|---|
start_x | int | None | start_x argument for this API call. |
start_y | int | None | start_y argument for this API call. |
end_x | int | None | end_x argument for this API call. |
end_y | int | None | end_y argument for this API call. |
color | Color | None | color argument for this API call. |
thickness | int | 1 | thickness 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_rectangledraw_text
Return to the drawing overview or continue with the quickstart.