Filling a Polygon?

BlitzMax Forums/BlitzMax Beginners Area/Filling a Polygon?

po(Posted 2007) [#1]
If I had the coords of the points of a 2D polygon shape, what would be one way of filling it in with a colour?


Perturbatio(Posted 2007) [#2]
Graphics 640,480,0,0

Global poly:Float[] = [100.0, 100.0, 150.0,180.0,50.0,180.0]
While Not KeyDown(KEY_ESCAPE)
	SetColor 255,0,0
	DrawPoly(poly)
	
	Flip
	Cls

Wend
End



po(Posted 2007) [#3]
Wow. That makes things very, very easy. Thanks!