The colors of points i1 .. i2 into the chain: the trajectory's, and the artist's color for points without one yet.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(CurveArtist), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | i1 |
the trajectory points |
||
| integer, | intent(in) | :: | i2 |
the trajectory points |
subroutine write_colors(self, i1, i2) type(CurveArtist), intent(inout) :: self integer, intent(in) :: i1, i2 !! the trajectory points real(c_float), dimension(:,:), pointer :: c, col integer :: j, lo, hi, m call self%traj%colors(col) m = self%traj%num_colors() do j = 1, self%chain%num_chunks() call self%chain%color_slice(j, i1, i2, lo, hi, c) if (.not. associated(c)) cycle if (m >= lo) c(:, 1:min(hi, m)-lo+1) = col(:, lo:min(hi, m)) if (hi > m) c(:, max(lo, m+1)-lo+1:) = spread(real(self%color_, c_float), 2, hi - max(lo, m+1) + 1) end do self%n_colored = min(m, i2) end subroutine write_colors