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).

@param image_data Target image buffer @param img_w, img_h Image dimensions @param x_quad, y_quad Quadrilateral vertex coordinates [4 vertices] @param r, g, b Fill color components [0.0, 1.0]

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