Skip to content

raylib.ImageDrawTriangleFan

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Draw a triangle fan defined by points within an image (first vertex is the center)

Parameters

Parameter Default Value Note
dst
points
color

Return value

None.

Notes

Example

img = raylib.GenImageColor(128, 128, raylib.BLACK)
// Draw a square as a triangle fan (center + 4 corners)
pts = [[64,64], [0,0], [127,0], [127,127], [0,127], [0,0]]
raylib.ImageDrawTriangleFan img, pts, raylib.GREEN
raylib.ExportImage img, "fan.png"
raylib.UnloadImage img

Clone this wiki locally