---
name: "al_draw_polygon"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_draw_polygon"
---

# al\_draw\_polygon(3)

Allegro 5 API

## NAME

al\_draw\_polygon - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_primitives.h>
  void al_draw_polygon(const float *vertices, int vertex_count,
     int join_style, ALLEGRO_COLOR color, float thickness, float miter_limit)
  ```

## DESCRIPTION

Draw an unfilled polygon. This is the same as passing `ALLEGRO_LINE_CAP_CLOSED` to [al\_draw\_polyline(3)](/al_draw_polyline/3.md).

- •

  vertex - Interleaved array of (x, y) vertex coordinates

- •

  vertex\_count - Number of vertices in the array

- •

  join\_style - Member of [ALLEGRO\_LINE\_JOIN(3)](/ALLEGRO_LINE_JOIN/3.md) specifying how to render the joins between line segments

- •

  color - Color of the line

- •

  thickness - Thickness of the line, pass `<= 0` to draw hairline lines

- •

  miter\_limit - Parameter for miter join style

## SINCE

5\.1.0

## SEE ALSO

[al\_draw\_filled\_polygon(3)](/al_draw_filled_polygon/3.md), [al\_draw\_polyline(3)](/al_draw_polyline/3.md), [ALLEGRO\_LINE\_JOIN(3)](/ALLEGRO_LINE_JOIN/3.md)
