capture Function

private function capture(self, file) result(ok)

Save the last frame as an image (format from the file extension, e.g. .png). Returns false on failure.

Type Bound

WindowProxy

Arguments

Type IntentOptional Attributes Name
class(WindowProxy), intent(inout) :: self
character(len=*), intent(in) :: file

image file name (e.g. .png)

Return Value logical


Calls

proc~~capture~~CallsGraph proc~capture WindowProxy%capture interface~vkf_viewer_capture vkf_viewer_capture proc~capture->interface~vkf_viewer_capture proc~is_open WindowProxy%is_open proc~capture->proc~is_open

Source Code

    logical function capture(self, file) result(ok)
        class(WindowProxy), intent(inout) :: self
        character(len=*), intent(in) :: file                !! image file name (e.g. .png)
        ok = .false.
        if (.not. self%is_open()) return
        ok = vkf_viewer_capture(self%viewer_, file, len(file, kind=c_int)) == 0
    end function capture