1polygon(3) Allegro manual polygon(3)
2
3
4
6 polygon - Draws a filled polygon. Allegro game programming library.
7
9 #include <allegro.h>
10
11
12 void polygon(BITMAP *bmp, int vertices, const int *points, int color);
13
15 Draws a filled polygon with an arbitrary number of corners. Pass the
16 number of vertices and an array containing a series of x, y points (a
17 total of vertices*2 values). Example:
18
19 int points[12] = { 50, 50, 100, 100, 100, 150,
20 50, 200, 0, 150, 0, 100 };
21 ...
22 clear_to_color(screen, makecol(255, 255, 255));
23 polygon(screen, 6, points, makecol(0, 0, 0));
24
25
27 triangle(3), polygon3d(3), drawing_mode(3), makecol(3), excamera(3)
28
29
30
31Allegro version 4.4.3 polygon(3)