Skip to content

raylib.ImageDrawRectangleLines

JoeStrout edited this page Oct 17, 2026 · 3 revisions

Draw rectangle lines within an image

Parameters

Parameter Default Value Note
dst
posX 0
posY 0
width 256
height 256
color WHITE

Return value

None.

Notes

Changed in raylib 6.2: this now takes position and size, with a 1-pixel line. The previous form (rec, thick, color) is now ImageDrawRectangleLinesEx.

Example

img = raylib.GenImageColor(128, 128, raylib.BLACK)
// Draw a 1px white rectangle outline
raylib.ImageDrawRectangleLines img, 10, 10, 108, 108, raylib.WHITE
raylib.ExportImage img, "rect_outline.png"
raylib.UnloadImage img

Clone this wiki locally