Alpha blend a pixel with existing pixel data
Core pixel blending routine used by all drawing functions. Uses consistent coordinate rounding (nint) to ensure alignment between line endpoints and marker centers (fixes issue #333).
@param image_data Packed RGB image array (signed bytes) @param img_w, img_h Image dimensions in pixels @param x, y Real-valued pixel coordinates (will be rounded) @param alpha Blending factor [0.0, 1.0] (clamped internally) @param new_r, new_g, new_b New color components [0.0, 1.0]
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 | |||
real(kind=wp), | intent(in) | :: | y | |||
real(kind=wp), | intent(in) | :: | alpha | |||
real(kind=wp), | intent(in) | :: | new_r | |||
real(kind=wp), | intent(in) | :: | new_g | |||
real(kind=wp), | intent(in) | :: | new_b |