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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | line |
line handle |
||
| logical, | intent(in) | :: | segments |
true for separate segments, false for a strip |
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