Draw a filled polygon (a quadrilateral, or the clip of one) using a scanline algorithm. Vertices must be finite and near the canvas.
Two passes. The integer-scanline pass reproduces the original solid fill exactly (so adjacent quads tile and full-coverage shapes are unchanged). A supersampled recovery pass then anti-aliases the edges and, crucially, paints thin band polygons that fall between integer scanlines: without it those strips vanish and leave the broken one-pixel arcs reported in issue #1961. The recovery pass only blends pixels the integer pass left untouched, so it never erodes the solid interior.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=1), | intent(inout) | :: | image_data(:) | |||
| integer, | intent(in) | :: | img_w | |||
| integer, | intent(in) | :: | img_h | |||
| real(kind=wp), | intent(in) | :: | x_quad(:) | |||
| real(kind=wp), | intent(in) | :: | y_quad(:) | |||
| real(kind=wp), | intent(in) | :: | r | |||
| real(kind=wp), | intent(in) | :: | g | |||
| real(kind=wp), | intent(in) | :: | b |