draw_line_distance_aa Subroutine

public subroutine draw_line_distance_aa(image_data, img_w, img_h, x0, y0, x1, y1, r, g, b, width)

Draw antialiased line using distance-based approach

Primary line drawing routine using geometric distance calculation. Provides high-quality antialiasing for lines of arbitrary width and orientation. Uses distance_point_to_line_segment for accurate alpha computation.

@param image_data Target image buffer (packed RGB bytes) @param img_w, img_h Image dimensions @param x0, y0, x1, y1 Line endpoints in pixel coordinates @param r, g, b Line color components [0.0, 1.0] @param width Line width in pixels (can be fractional)

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) :: x0
real(kind=wp), intent(in) :: y0
real(kind=wp), intent(in) :: x1
real(kind=wp), intent(in) :: y1
real(kind=wp), intent(in) :: r
real(kind=wp), intent(in) :: g
real(kind=wp), intent(in) :: b
real(kind=wp), intent(in) :: width