draw_filled_quad_raster_alpha Subroutine

public subroutine draw_filled_quad_raster_alpha(image_data, img_w, img_h, x_quad, y_quad, r, g, b, opacity)

Draw filled quadrilateral with anti-aliased, supersampled coverage and alpha blending. Supersampling in both axes gives the correct filled area for rotated quads such as diamond markers: a per-scanline nint span (the previous approach) collapsed the narrow rows near a diamond's tips, leaving the concave four-petal artifact. Each pixel's coverage is the fraction of sub-samples inside the polygon, then blended once at coverage*opacity so overlapping fills do not double-darken.

Arguments

Type IntentOptional 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(4)
real(kind=wp), intent(in) :: y_quad(4)
real(kind=wp), intent(in) :: r
real(kind=wp), intent(in) :: g
real(kind=wp), intent(in) :: b
real(kind=wp), intent(in) :: opacity