new_custom_line_segments Function

private function new_custom_line_segments(name, color, width) result(s)

Line segments named name, of color (for segments set without colors; default white) and width (window units; default 1).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

the frame's name

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

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

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

line width (window units)

Return Value type(CustomLineSegments)


Called by

proc~~new_custom_line_segments~~CalledByGraph proc~new_custom_line_segments new_custom_line_segments interface~customlinesegments CustomLineSegments interface~customlinesegments->proc~new_custom_line_segments

Source Code

    function new_custom_line_segments(name, color, width) result(s)
        character(len=*), intent(in) :: name            !! the frame's name
        real(wp), intent(in), optional :: color(:)      !! [r, g, b] or [r, g, b, a] (0 to 1)
        real(wp), intent(in), optional :: width         !! line width (window units)
        type(CustomLineSegments) :: s
        s%ReferenceFrame = ReferenceFrame(name, color)
        if (present(width)) s%width_ = max(0.0_wp, width)
        allocate(s%a(3, 0), s%b(3, 0))
    end function new_custom_line_segments