You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JoeStrout edited this page Oct 17, 2026
·
1 revision
Draw a color-filled rectangle with pro parameters within and image
Parameters
Parameter
Default Value
Note
dst
rec
origin
[0, 0]
rotation
0
color
WHITE
Return value
None.
Notes
rotation is in degrees around the pivot point rec.x + origin.x, rec.y + origin.y. Note: this differs from DrawRectanglePro, where the pivot is at rec.x, rec.y and the rectangle is offset by origin.
Example
img=raylib.GenImageColor(128, 128, raylib.BLACK)
// A 60x10 bar rotated 30 degrees about its centerraylib.ImageDrawRectangleProimg, [34, 59, 60, 10], [30, 5], 30, raylib.WHITEraylib.ExportImageimg, "bar.png"raylib.UnloadImageimg