ribbon_point_rgba Function

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

Color of point i in a colored chain: the trajectory's, or the artist's (opaque: the style has the alpha) if it has none yet.

Arguments

Type IntentOptional Attributes Name
type(RibbonArtist), intent(in) :: self
integer, intent(in) :: i

the trajectory point

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


Calls

proc~~ribbon_point_rgba~~CallsGraph proc~ribbon_point_rgba ribbon_point_rgba color color proc~ribbon_point_rgba->color num_colors num_colors proc~ribbon_point_rgba->num_colors

Called by

proc~~ribbon_point_rgba~~CalledByGraph proc~ribbon_point_rgba ribbon_point_rgba proc~update_ribbon_tail RibbonArtist%update_ribbon_tail proc~update_ribbon_tail->proc~ribbon_point_rgba

Source Code

    function ribbon_point_rgba(self, i) result(rgba)
        type(RibbonArtist), intent(in) :: self
        integer, intent(in) :: i                            !! the trajectory point
        real(wp) :: rgba(4)
        if (i <= self%traj%num_colors()) then
            rgba = self%traj%color(i)
        else
            rgba = [self%color_(1:3), 1.0_wp]
        end if
    end function ribbon_point_rgba