Set a line's dash pattern, as OpenGL's line stipple: each bit of the
16-bit pattern (bit 0 first; z'FFFF' solid) covers factor window
units (see shaders/line.vert).
Returns 0, or -1 on failure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | line |
line handle |
||
| integer, | intent(in) | :: | factor | |||
| integer, | intent(in) | :: | pattern |
integer(c_int) function line_set_pattern(line, factor, pattern) result(status) type(c_ptr), intent(in) :: line !! line handle integer, intent(in) :: factor, pattern 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(7) = real(iand(pattern, int(z'FFFF')), c_float) style(8) = real(max(factor, 1), c_float) status = vkf_line_style_changed(line) end function line_set_pattern