curve_set_dash_mode Subroutine

private subroutine curve_set_dash_mode(self, mode, length)

How the dash pattern (and a trail's) is laid out: DASH_SCENE (the default) anchored to the line: a dash stays put on it as the view changes, its size in scene units (one per line and view, from 0.7 to 1.4 times the pattern's on screen, changing by doubling as it zooms); DASH_SCREEN screen-locked, as OpenGL's line stipple (OpenFrames'): every dash the pattern's length in pixels, at any zoom and depth, sliding along the line as the view changes; DASH_FIXED a fixed length of the line, as paint on it: never changing, so zooming in the dashes grow on screen, and out they shrink (under a pixel, blending into a fainter solid line); length (scene units, for the whole pattern: the other patterns, a trail's future's and the arrows', in proportion), else the pattern's length on screen where the line is first drawn. DASH_SCREEN and DASH_FIXED cost projecting the points drawn on the CPU, per view and frame.

Type Bound

CurveArtist

Arguments

Type IntentOptional Attributes Name
class(CurveArtist), intent(inout) :: self
integer, intent(in) :: mode

DASH_SCENE, DASH_SCREEN or DASH_FIXED

real(kind=wp), intent(in), optional :: length

(DASH_FIXED) the pattern's length, scene units


Calls

proc~~curve_set_dash_mode~~CallsGraph proc~curve_set_dash_mode CurveArtist%curve_set_dash_mode set_dash_mode set_dash_mode proc~curve_set_dash_mode->set_dash_mode style_node style_node proc~curve_set_dash_mode->style_node

Source Code

    subroutine curve_set_dash_mode(self, mode, length)
        class(CurveArtist), intent(inout) :: self
        integer, intent(in) :: mode                         !! DASH_SCENE, DASH_SCREEN or DASH_FIXED
        real(wp), intent(in), optional :: length            !! (DASH_FIXED) the pattern's length, scene units
        real(wp) :: l
        l = 0.0_wp
        if (present(length)) l = max(0.0_wp, length)
        call self%chain%set_dash_mode(mode, l)
        if (c_associated(self%tail)) call self%chain%style_node(self%tail)
    end subroutine curve_set_dash_mode