draw_filled_quad_raster Subroutine

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

Draw filled quadrilateral using scanline algorithm

General polygon filling routine for arbitrary convex quadrilaterals. Uses horizontal scanline approach with edge intersection calculation. Vertices should be provided in consistent order (clockwise or counter-clockwise).

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