-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageDrawLine
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draw line within an image
| Parameter | Default Value | Note |
|---|---|---|
| dst | ||
| startPosX | 0 | |
| startPosY | 0 | |
| endPosX | 0 | |
| endPosY | 0 | |
| color | WHITE |
None.
img = raylib.GenImageColor(128, 128, raylib.BLACK)
// Draw a diagonal line from top-left to bottom-right
raylib.ImageDrawLine img, 0, 0, 127, 127, raylib.WHITE
raylib.ExportImage img, "line.png"
raylib.UnloadImage img