pub struct PdfiumRect {
pub left: f32,
pub top: f32,
pub right: f32,
pub bottom: f32,
}Expand description
Rust interface to FS_RECTF
Fields§
§left: f32The x-coordinate of the left-top corner.
top: f32The y-coordinate of the left-top corner.
right: f32The x-coordinate of the right-bottom corner.
bottom: f32The y-coordinate of the right-bottom corner.
Implementations§
Source§impl PdfiumRect
impl PdfiumRect
Sourcepub fn zero() -> Self
pub fn zero() -> Self
Creates a new PdfiumRect object with all values set to 0.0.
Sourcepub fn new(left: f32, top: f32, right: f32, bottom: f32) -> Self
pub fn new(left: f32, top: f32, right: f32, bottom: f32) -> Self
Creates a new PdfiumRect with the given values.
Sourcepub fn new_from_lbrt(value: (f32, f32, f32, f32)) -> Self
pub fn new_from_lbrt(value: (f32, f32, f32, f32)) -> Self
Creates a new PdfiumRect from a (left, bottom, right, top) tuple.
Sourcepub fn width(&self) -> f32
pub fn width(&self) -> f32
Returns the width of this PdfiumRect.
Sourcepub fn height(&self) -> f32
pub fn height(&self) -> f32
Returns the height of this PdfiumRect.
Trait Implementations§
Source§impl Clone for PdfiumRect
impl Clone for PdfiumRect
Source§fn clone(&self) -> PdfiumRect
fn clone(&self) -> PdfiumRect
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PdfiumRect
impl Debug for PdfiumRect
Source§impl From<&PdfiumRect> for *const FS_RECTF
impl From<&PdfiumRect> for *const FS_RECTF
Source§fn from(rect: &PdfiumRect) -> Self
fn from(rect: &PdfiumRect) -> Self
Converts to this type from the input type.
Source§impl From<&PdfiumRect> for FS_RECTF
impl From<&PdfiumRect> for FS_RECTF
Source§fn from(rect: &PdfiumRect) -> Self
fn from(rect: &PdfiumRect) -> Self
Converts to this type from the input type.
Source§impl From<_FS_RECTF_> for PdfiumRect
impl From<_FS_RECTF_> for PdfiumRect
impl Copy for PdfiumRect
Auto Trait Implementations§
impl Freeze for PdfiumRect
impl RefUnwindSafe for PdfiumRect
impl Send for PdfiumRect
impl Sync for PdfiumRect
impl Unpin for PdfiumRect
impl UnwindSafe for PdfiumRect
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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