set_background_color Subroutine

private subroutine set_background_color(self, rgb)

The background color [r, g, b] (0 to 1; default black).

Type Bound

WindowProxy

Arguments

Type IntentOptional Attributes Name
class(WindowProxy), intent(inout) :: self
real(kind=wp), intent(in) :: rgb(3)

[r, g, b], 0 to 1


Calls

proc~~set_background_color~~CallsGraph proc~set_background_color WindowProxy%set_background_color interface~vkf_viewer_set_background vkf_viewer_set_background proc~set_background_color->interface~vkf_viewer_set_background

Called by

proc~~set_background_color~~CalledByGraph proc~set_background_color WindowProxy%set_background_color proc~open WindowProxy%open proc~open->proc~set_background_color

Source Code

    subroutine set_background_color(self, rgb)
        class(WindowProxy), intent(inout) :: self
        real(wp), intent(in) :: rgb(3)                      !! [r, g, b], 0 to 1
        self%background = rgb
        if (c_associated(self%viewer_)) then
            if (vkf_viewer_set_background(self%viewer_, real([rgb, 1.0_wp], c_float)) /= 0) &
                write(*, '(a)') 'vkframes: could not set the background color'
        end if
    end subroutine set_background_color