Re: [AD] Documentation missing

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 26 Apr 2012 23:53:43 +0200
Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:

> Would it be possible for someone to document
> al_draw_filled_polygon_with_holes and relatives? It's not obvious to
> me how to use them and I can't work it out from the code.
> 

I found an example, I can try document off that maybe:
            
float xy[] = {
	0, 0,
	0, 100,
	100, 100,
	100, 0,

	10, 10,
	90, 10,
	50, 90};
int holes[] = {4, 7};
al_draw_filled_polygon_with_holes(xy, 7, holes, 2, color)
 
Basically the first 4 xy pairs are a polygon (it can be non-convex).
Then follows another 3 xy pairs denoting a hole. The holes array
specifies the index positions where vertices change direction. So
index 4 is the start of a hole. I never tried more than one hole but
without that 7 it didn't work.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/