marker_drawn_color Function

private function marker_drawn_color(self, which, k) result(rgba)

The color marker k of which (one MARKER_* flag; k: the intermediate marker's number) is drawn in: read back from its buffer with point colors, else the marker's own color.

Type Bound

MarkerArtist

Arguments

Type IntentOptional Attributes Name
class(MarkerArtist), intent(in) :: self
integer, intent(in) :: which

MARKER_START, MARKER_INTERMEDIATE or MARKER_END

integer, intent(in), optional :: k

the intermediate marker's number (default 1)

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


Calls

proc~~marker_drawn_color~~CallsGraph proc~marker_drawn_color MarkerArtist%marker_drawn_color proc~is_colored LineChain%is_colored proc~marker_drawn_color->proc~is_colored proc~point_color LineChain%point_color proc~marker_drawn_color->proc~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

Source Code

    function marker_drawn_color(self, which, k) result(rgba)
        class(MarkerArtist), intent(in) :: self
        integer, intent(in) :: which                        !! MARKER_START, MARKER_INTERMEDIATE or MARKER_END
        integer, intent(in), optional :: k                  !! the intermediate marker's number (default 1)
        real(wp) :: rgba(4)
        integer :: i
        i = 1
        if (present(k)) i = k
        select case (which)
        case (MARKER_START)
            rgba = self%start_color
            if (self%start_node%is_colored()) rgba = self%start_node%point_color(1)
        case (MARKER_END)
            rgba = self%end_color
            if (self%end_node%is_colored()) rgba = self%end_node%point_color(1)
        case default
            rgba = self%intermediate_color
            if (self%inter%is_colored()) rgba = self%inter%point_color(i)
        end select
    end function marker_drawn_color