line_set_segments Function

public function line_set_segments(line, segments) result(status)

Draw a line's points as separate segments (pairs of points: 1-2, 3-4, ...) instead of a strip. Set before its points are drawn. Returns 0, or -1 on failure.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: line

line handle

logical, intent(in) :: segments

true for separate segments, false for a strip

Return Value integer(kind=c_int)


Calls

proc~~line_set_segments~~CallsGraph proc~line_set_segments line_set_segments interface~vkf_line_style vkf_line_style proc~line_set_segments->interface~vkf_line_style interface~vkf_line_style_changed vkf_line_style_changed proc~line_set_segments->interface~vkf_line_style_changed

Called by

proc~~line_set_segments~~CalledByGraph proc~line_set_segments line_set_segments proc~line_node line_node proc~line_node->proc~line_set_segments proc~reserve LineChain%reserve proc~reserve->proc~line_set_segments proc~build_marker_nodes build_marker_nodes proc~build_marker_nodes->proc~reserve proc~chain_build ChainArtist%chain_build proc~chain_build->proc~reserve proc~make_axes make_axes proc~make_axes->proc~line_node proc~make_cone make_cone proc~make_cone->proc~line_node proc~make_grid make_grid proc~make_grid->proc~line_node proc~make_plane make_plane proc~make_plane->proc~line_node proc~make_polyhedron make_polyhedron proc~make_polyhedron->proc~line_node proc~segment_build SegmentArtist%segment_build proc~segment_build->proc~reserve proc~segment_update SegmentArtist%segment_update proc~segment_update->proc~reserve proc~segments_build_contents CustomLineSegments%segments_build_contents proc~segments_build_contents->proc~reserve proc~write_changed write_changed proc~write_changed->proc~reserve proc~write_intermediates write_intermediates proc~write_intermediates->proc~reserve proc~write_segments~2 write_segments proc~write_segments~2->proc~reserve proc~add_intermediates add_intermediates proc~add_intermediates->proc~write_intermediates proc~axes_build_contents CoordinateAxes%axes_build_contents proc~axes_build_contents->proc~make_axes proc~axes_set_color CoordinateAxes%axes_set_color proc~axes_set_color->proc~make_axes proc~chain_update ChainArtist%chain_update proc~chain_update->proc~write_changed proc~cone_build_contents PolyhedralCone%cone_build_contents proc~cone_build_contents->proc~make_cone proc~cone_set_line_color PolyhedralCone%cone_set_line_color proc~cone_set_line_color->proc~make_cone proc~curve_update CurveArtist%curve_update proc~curve_update->proc~write_changed proc~elliptic_set_primary_angles EllipticCone%elliptic_set_primary_angles proc~elliptic_set_primary_angles->proc~make_cone proc~grid_build_contents LatLonGrid%grid_build_contents proc~grid_build_contents->proc~make_grid proc~grid_set_color LatLonGrid%grid_set_color proc~grid_set_color->proc~make_grid proc~grid_set_parameters LatLonGrid%grid_set_parameters proc~grid_set_parameters->proc~make_grid proc~marker_build MarkerArtist%marker_build proc~marker_build->proc~build_marker_nodes proc~plane_build_contents RadialPlane%plane_build_contents proc~plane_build_contents->proc~make_plane proc~plane_set_line_color RadialPlane%plane_set_line_color proc~plane_set_line_color->proc~make_plane proc~plane_set_parameters RadialPlane%plane_set_parameters proc~plane_set_parameters->proc~make_plane proc~poly_build_contents Polyhedron%poly_build_contents proc~poly_build_contents->proc~make_polyhedron proc~poly_set_draw_mode Polyhedron%poly_set_draw_mode proc~poly_set_draw_mode->proc~make_polyhedron proc~poly_set_line_color Polyhedron%poly_set_line_color proc~poly_set_line_color->proc~make_polyhedron proc~poly_set_line_width Polyhedron%poly_set_line_width proc~poly_set_line_width->proc~make_polyhedron proc~poly_set_opacity Polyhedron%poly_set_opacity proc~poly_set_opacity->proc~make_polyhedron proc~rebuild_markers rebuild_markers proc~rebuild_markers->proc~build_marker_nodes proc~rect_set_primary_angles RectangularCone%rect_set_primary_angles proc~rect_set_primary_angles->proc~make_cone proc~remove_vertex_colors Polyhedron%remove_vertex_colors proc~remove_vertex_colors->proc~make_polyhedron proc~segments_late_update CustomLineSegments%segments_late_update proc~segments_late_update->proc~write_segments~2 proc~set_axis_length CoordinateAxes%set_axis_length proc~set_axis_length->proc~make_axes proc~set_axis_width CoordinateAxes%set_axis_width proc~set_axis_width->proc~make_axes proc~set_cone_color PolyhedralCone%set_cone_color proc~set_cone_color->proc~make_cone proc~set_cone_length PolyhedralCone%set_cone_length proc~set_cone_length->proc~make_cone proc~set_draw_axes CoordinateAxes%set_draw_axes proc~set_draw_axes->proc~make_axes proc~set_draw_mode PolyhedralCone%set_draw_mode proc~set_draw_mode->proc~make_cone proc~set_edges Polyhedron%set_edges proc~set_edges->proc~make_polyhedron proc~set_face_color Polyhedron%set_face_color proc~set_face_color->proc~make_polyhedron proc~set_faces Polyhedron%set_faces proc~set_faces->proc~make_polyhedron proc~set_grid Polyhedron%set_grid proc~set_grid->proc~make_polyhedron proc~set_line_widths LatLonGrid%set_line_widths proc~set_line_widths->proc~make_grid proc~set_lit Polyhedron%set_lit proc~set_lit->proc~make_polyhedron proc~set_plane_color RadialPlane%set_plane_color proc~set_plane_color->proc~make_plane proc~set_point_color Polyhedron%set_point_color proc~set_point_color->proc~make_polyhedron proc~set_point_size Polyhedron%set_point_size proc~set_point_size->proc~make_polyhedron proc~set_smooth Polyhedron%set_smooth proc~set_smooth->proc~make_polyhedron proc~set_tick_image CoordinateAxes%set_tick_image proc~set_tick_image->proc~make_axes proc~set_tick_shape CoordinateAxes%set_tick_shape proc~set_tick_shape->proc~make_axes proc~set_tick_size CoordinateAxes%set_tick_size proc~set_tick_size->proc~make_axes proc~set_tick_spacing CoordinateAxes%set_tick_spacing proc~set_tick_spacing->proc~make_axes proc~set_triangles Polyhedron%set_triangles proc~set_triangles->proc~make_polyhedron proc~set_two_sided Polyhedron%set_two_sided proc~set_two_sided->proc~make_polyhedron proc~set_vertex_angles PolyhedralCone%set_vertex_angles proc~set_vertex_angles->proc~make_cone proc~set_vertex_colors Polyhedron%set_vertex_colors proc~set_vertex_colors->proc~make_polyhedron proc~set_vertices Polyhedron%set_vertices proc~set_vertices->proc~make_polyhedron proc~marker_set_point_colors MarkerArtist%marker_set_point_colors proc~marker_set_point_colors->proc~rebuild_markers proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~add_intermediates proc~marker_update->proc~rebuild_markers proc~set_marker_image MarkerArtist%set_marker_image proc~set_marker_image->proc~rebuild_markers

Source Code

    integer(c_int) function line_set_segments(line, segments) result(status)
        type(c_ptr), intent(in) :: line      !! line handle
        logical, intent(in) :: segments      !! true for separate segments, false for a strip
        real(c_float), dimension(:), pointer :: style
        type(c_ptr) :: buffer
        buffer = vkf_line_style(line)
        if (.not. c_associated(buffer)) then
            status = -1
            return
        end if
        call c_f_pointer(buffer, style, [8])
        style(6) = merge(1.0_c_float, 0.0_c_float, segments)
        status = vkf_line_style_changed(line)
    end function line_set_segments