Struct xray::OpenGlScreenshotCaptor [−][src]
pub struct OpenGlScreenshotCaptor {}
Captures a screenshot using gl::ReadPixels
To use this screenshot captor, OpenGL must be able to load function pointers. If you use Piston or Glutin, this is likely already the case.
If you use a lower level library like gl
directly, you may need to call
gl::load_with(|symbol| glfw.get_proc_address(s)))
or similar, depending on your choice of gl library and context library.
Trait Implementations
impl ScreenshotCaptor for OpenGlScreenshotCaptor
[src]
impl ScreenshotCaptor for OpenGlScreenshotCaptor
fn capture_image(
&self,
x: i32,
y: i32,
width: u32,
height: u32
) -> Result<DynamicImage, XrayError>
[src]
fn capture_image(
&self,
x: i32,
y: i32,
width: u32,
height: u32
) -> Result<DynamicImage, XrayError>
Takes a screenshot of the area (x, y, x + width, y + height) Returns a ScreenshotError::ErrorCapturingImage if the image could not be captured. Read more
Auto Trait Implementations
impl Send for OpenGlScreenshotCaptor
impl Send for OpenGlScreenshotCaptor
impl Sync for OpenGlScreenshotCaptor
impl Sync for OpenGlScreenshotCaptor