polygon(3alleg)

polygon3alleg

Draws a filled polygon. allegro game programming library.

Usage

#include <allegro.h>

void polygon(BITMAP *bmp, int vertices, const int *points, int color);

Overview

Draws a filled polygon with an arbitrary number of corners. Pass the number of vertices and an array containing a series of x, y points (a total of vertices*2 values). Example:

   int points[12] = { 50, 50,   100, 100,  100, 150,
                      50, 200,  0,   150,  0,   100 };
   ...
   clear_to_color(screen, makecol(255, 255, 255));
   polygon(screen, 6, points, makecol(0, 0, 0));

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.