set_highlight Subroutine

private subroutine set_highlight(self, flags, color, spacing, speed, band, period)

For lines, the highlight (see shaders/line.vert): flags (1 pulse, 2 arrows; 0 none), its color (rgba), the arrows' spacing and speed (window units, and per second), the band's width (window units) and the pulse's period (s).

Type Bound

LineChain

Arguments

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

1 pulse + 2 arrows (0: none)

real(kind=wp), intent(in) :: color(4)

[r, g, b, a] (0 to 1)

real(kind=wp), intent(in) :: spacing

between arrows (window units)

real(kind=wp), intent(in) :: speed

of the arrows (window units per second)

real(kind=wp), intent(in) :: band

width of the band the arrows are drawn in (window units)

real(kind=wp), intent(in) :: period

of the pulse (s)


Calls

proc~~set_highlight~~CallsGraph proc~set_highlight LineChain%set_highlight proc~apply_style apply_style proc~set_highlight->proc~apply_style interface~vkf_line_set_dash_mode vkf_line_set_dash_mode proc~apply_style->interface~vkf_line_set_dash_mode interface~vkf_line_set_highlight vkf_line_set_highlight proc~apply_style->interface~vkf_line_set_highlight interface~vkf_line_set_trail vkf_line_set_trail proc~apply_style->interface~vkf_line_set_trail proc~check_status check_status proc~apply_style->proc~check_status proc~line_set_pattern line_set_pattern proc~apply_style->proc~line_set_pattern proc~line_set_style line_set_style proc~apply_style->proc~line_set_style proc~marker_set_style marker_set_style proc~apply_style->proc~marker_set_style interface~vkf_line_style vkf_line_style proc~line_set_pattern->interface~vkf_line_style interface~vkf_line_style_changed vkf_line_style_changed proc~line_set_pattern->interface~vkf_line_style_changed proc~line_set_style->interface~vkf_line_style proc~line_set_style->interface~vkf_line_style_changed proc~marker_set_style->interface~vkf_line_style proc~marker_set_style->interface~vkf_line_style_changed

Called by

proc~~set_highlight~~CalledByGraph proc~set_highlight LineChain%set_highlight proc~apply_highlight apply_highlight proc~apply_highlight->proc~set_highlight proc~curve_style CurveArtist%curve_style proc~curve_style->proc~apply_highlight proc~segment_set_highlight SegmentArtist%segment_set_highlight proc~segment_set_highlight->proc~apply_highlight proc~curve_set_color CurveArtist%curve_set_color proc~curve_set_color->proc~curve_style proc~curve_set_highlight CurveArtist%curve_set_highlight proc~curve_set_highlight->proc~curve_style proc~curve_set_pattern CurveArtist%curve_set_pattern proc~curve_set_pattern->proc~curve_style proc~curve_set_width CurveArtist%curve_set_width proc~curve_set_width->proc~curve_style proc~new_curve_artist new_curve_artist proc~new_curve_artist->proc~curve_set_color interface~curveartist CurveArtist interface~curveartist->proc~new_curve_artist

Source Code

    subroutine set_highlight(self, flags, color, spacing, speed, band, period)
        class(LineChain), intent(inout) :: self
        integer, intent(in) :: flags            !! 1 pulse + 2 arrows (0: none)
        real(wp), intent(in) :: color(4)        !! [r, g, b, a] (0 to 1)
        real(wp), intent(in) :: spacing         !! between arrows (window units)
        real(wp), intent(in) :: speed           !! of the arrows (window units per second)
        real(wp), intent(in) :: band            !! width of the band the arrows are drawn in (window units)
        real(wp), intent(in) :: period          !! of the pulse (s)
        integer :: j
        self%highlight = real([color, real(flags, wp), spacing, speed, band, period, 0.0_wp, 0.0_wp, 0.0_wp], &
                              c_float)
        do j = 1, self%n_chunks
            call apply_style(self, self%chunks(j)%line)
        end do
    end subroutine set_highlight