create_bezier(...,reverse=.true.) should swap the endpoint colors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_072(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "create_bezier(reverse=.true.) swaps endpoints" logical :: ok type(Colormap) :: cm integer :: colors(2,3) integer :: r, g, b colors(1,:) = [ 1, 2, 3 ] colors(2,:) = [ 11, 12, 13 ] call cm%create_bezier("bez", 0.0_wp, 1.0_wp, colors, 16, reverse=.true.) call cm%get_RGB(0, r, g, b) ok = (r == colors(2,1)) .and. (g == colors(2,2)) .and. (b == colors(2,3)) call cm%get_RGB(cm%get_levels()-1, r, g, b) ok = ok .and. (r == colors(1,1)) .and. (g == colors(1,2)) .and. (b == colors(1,3)) call report_test(name, ok, id, nfail) end subroutine test_072