.\" Automatically generated by Pandoc 3.4 .\" .TH "al_draw_filled_polygon_with_holes" "3" "" "Allegro reference manual" .SH NAME al_draw_filled_polygon_with_holes \- Allegro 5 API .SH SYNOPSIS .IP .EX #include \f[B]\f[R] void al_draw_filled_polygon_with_holes(const float *vertices, const int *vertex_counts, ALLEGRO_COLOR color) .EE .SH DESCRIPTION Draws a filled simple polygon with zero or more other simple polygons subtracted from it \- the holes. The holes cannot touch or intersect with the outline of the filled polygon. .IP \[bu] 2 vertices \- Interleaved array of (x, y) vertex coordinates for each of the polygons, including holes. .IP \[bu] 2 vertex_counts \- Number of vertices for each polygon. The number of vertices in the filled polygon is given by vertex_counts[0] and must be at least three. Subsequent elements indicate the number of vertices in each hole. The array must be terminated with an element with value zero. .IP \[bu] 2 color \- Color of the filled polygon .PP When the y\-axis is facing downwards (the usual) the filled polygon coordinates must be ordered anti\-clockwise. All hole vertices must use the opposite order (clockwise with y down). All hole vertices must be inside the main polygon and no hole may overlap the main polygon. .PP For example: .IP .EX float vertices[] = { 0, 0, \f[I]// filled polygon, upper left corner\f[R] 0, 100, \f[I]// filled polygon, lower left corner\f[R] 100, 100, \f[I]// filled polygon, lower right corner\f[R] 100, 0, \f[I]// filled polygon, upper right corner\f[R] 10, 10, \f[I]// hole, upper left\f[R] 90, 10, \f[I]// hole, upper right\f[R] 90, 90 \f[I]// hole, lower right\f[R] }; int vertex_counts[] = { 4, \f[I]// number of vertices for filled polygon\f[R] 3, \f[I]// number of vertices for hole\f[R] 0 \f[I]// terminator\f[R] }; .EE .PP There are 7 vertices: four for an outer square from (0, 0) to (100, 100) in anti\-clockwise order, and three more for an inner triangle in clockwise order. The outer main polygon uses vertices 0 to 3 (inclusive) and the hole uses vertices 4 to 6 (inclusive). .SH SINCE 5.1.0 .SH SEE ALSO al_draw_filled_polygon(3), al_draw_filled_polygon_with_holes(3), al_triangulate_polygon(3)