Color i of c (color_a or color_b), or the frame's color if c is not allocated.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(CustomLineSegments), | intent(in) | :: | self | |||
| real(kind=c_float), | intent(in), | allocatable | :: | c(:,:) |
(4, n): [r, g, b, a] |
|
| integer, | intent(in) | :: | i |
1 to num_segments |
function segment_color(self, c, i) result(rgba4) type(CustomLineSegments), intent(in) :: self real(c_float), allocatable, intent(in) :: c(:,:) !! (4, n): [r, g, b, a] integer, intent(in) :: i !! 1 to num_segments real(wp) :: rgba4(4) if (allocated(c)) then rgba4 = real(c(:, i), wp) else rgba4 = self%color() end if end function segment_color