-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageDrawRectangle
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draw rectangle within an image
| Parameter | Default Value | Note |
|---|---|---|
| dst | ||
| posX | 0 | |
| posY | 0 | |
| width | 256 | |
| height | 256 | |
| color | WHITE |
None.
img = raylib.GenImageColor(128, 128, raylib.BLACK)
// Draw a 32x32 red rectangle at (48, 48)
raylib.ImageDrawRectangle img, 48, 48, 32, 32, raylib.RED
raylib.ExportImage img, "rect.png"
raylib.UnloadImage img