Skip to content

raylib.ImageDrawTriangleFan

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Draw a triangle fan defined by a list of at least 3 points within an image (first point 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