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 Apr 29, 2026
·
2 revisions
Generate image: square gradient
Parameters
Parameter
Default Value
Note
width
256
height
256
density
0.5
inner
WHITE
outer
BLACK
Return value
Condition
Return Value
(always)
map
Notes
Example
// White center with black corners, square gradientimg=raylib.GenImageGradientSquare(128, 128, 0.0, raylib.WHITE, raylib.BLACK)
tex=raylib.LoadTextureFromImage(img)
raylib.UnloadImageimgraylib.BeginDrawingraylib.ClearBackgroundraylib.BLACKraylib.DrawTexturetex, 0, 0, raylib.WHITEraylib.EndDrawingraylib.UnloadTexturetex