Skip to content

raylib.DrawRectangleGradientH

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Draw a horizontal-gradient-filled rectangle

Parameters

Parameter Default Value Note
posX 0
posY 0
width 256
height 256
color1 WHITE
color2 BLACK

Return value

None.

Notes

Example

// Draw a rectangle that fades from red on the left to blue on the right
raylib.DrawRectangleGradientH 50, 50, 200, 100, raylib.RED, raylib.BLUE

Clone this wiki locally