Bézier colormap output must be clamped to valid 8-bit RGB [0,255].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_030(id, nfail) use forcolormap_utils, only: bezier integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "bezier: values clamped to [0,255] for 4 control points" logical :: ok integer :: colors(4,3) integer, allocatable :: map(:,:) colors(1,:) = [ 0, 0, 0 ] colors(2,:) = [ 255, 0, 0 ] colors(3,:) = [ 0, 255, 0 ] colors(4,:) = [ 0, 0, 255 ] map = bezier(colors, 128) ok = all(map >= 0) .and. all(map <= 255) call report_test(name, ok, id, nfail) end subroutine test_030