point_color Function

private function point_color(self, i) result(rgba)

The color of point i of a colored chain, as stored (rgba; white if not colored).

Type Bound

LineChain

Arguments

Type IntentOptional Attributes Name
class(LineChain), intent(in) :: self
integer, intent(in) :: i

chain index

Return Value real(kind=wp), (4)


Calls

proc~~point_color~~CallsGraph proc~point_color LineChain%point_color proc~color_slice LineChain%color_slice proc~point_color->proc~color_slice interface~vkf_line_colors vkf_line_colors proc~color_slice->interface~vkf_line_colors

Called by

proc~~point_color~~CalledByGraph proc~point_color LineChain%point_color proc~drawn_segment~2 CustomLineSegments%drawn_segment proc~drawn_segment~2->proc~point_color proc~marker_drawn_color MarkerArtist%marker_drawn_color proc~marker_drawn_color->proc~point_color

Source Code

    function point_color(self, i) result(rgba)
        class(LineChain), intent(in) :: self
        integer, intent(in) :: i                !! chain index
        real(wp) :: rgba(4)
        real(c_float), dimension(:,:), pointer :: c
        integer :: j, lo, hi
        rgba = 1.0_wp
        do j = 1, self%n_chunks
            call self%color_slice(j, i, i, lo, hi, c)
            if (associated(c)) then
                rgba = real(c(:, 1), wp)
                return
            end if
        end do
    end function point_color