Set the color (rgba) and width (window units: logical pixels) of a line strip.
Returns 0, or -1 on failure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | line |
line or ribbon handle |
||
| real(kind=c_float), | intent(in), | dimension(4) | :: | rgba |
color (rgba, 0 to 1) |
|
| real(kind=c_float), | intent(in) | :: | width |
width (window units) |
integer(c_int) function line_set_style(line, rgba, width) result(status) type(c_ptr), intent(in) :: line !! line or ribbon handle real(c_float), dimension(4), intent(in) :: rgba !! color (rgba, 0 to 1) real(c_float), intent(in) :: width !! width (window units) 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(1:4) = rgba style(5) = width status = vkf_line_style_changed(line) end function line_set_style