pub struct Monitor { /* private fields */ }
Implementations§
source§impl Monitor
impl Monitor
pub fn all() -> XCapResult<Vec<Monitor>>
pub fn from_point(x: i32, y: i32) -> XCapResult<Monitor>
source§impl Monitor
impl Monitor
sourcepub fn rotation(&self) -> f32
pub fn rotation(&self) -> f32
Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees.
sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Output device’s pixel scale factor.
sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Whether the screen is the main screen
source§impl Monitor
impl Monitor
sourcepub fn capture_image(&self) -> XCapResult<RgbaImage>
pub fn capture_image(&self) -> XCapResult<RgbaImage>
Capture image of the monitor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Monitor
impl RefUnwindSafe for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin for Monitor
impl UnwindSafe for Monitor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more