pub struct PdfPoints {
pub value: f32,
}Expand description
The internal coordinate system inside a PdfDocument is measured in Points, a device-independent unit equal to 1/72 inches, roughly 0.358 mm. Points are converted to pixels when a PdfPage is rendered into a PdfBitmap.
Fields§
§value: f32Implementations§
Source§impl PdfPoints
impl PdfPoints
Sourcepub const MAX: PdfPoints
pub const MAX: PdfPoints
A PdfPoints object with the largest addressable finite positive value.
Sourcepub const MIN: PdfPoints
pub const MIN: PdfPoints
A PdfPoints object with the smallest addressable finite negative value.
Sourcepub const fn zero() -> Self
pub const fn zero() -> Self
Creates a new PdfPoints object with the value 0.0.
Consider using the compile-time constant value PdfPoints::ZERO rather than calling this function directly.
Sourcepub const fn max() -> Self
pub const fn max() -> Self
A PdfPoints object with the largest addressable finite positive value.
In theory, this should be f32::MAX; in practice, values approaching f32::MAX are handled inconsistently by Pdfium, so this value is set to an arbitrarily large positive value that does not approach f32::MAX but should more than suffice for every use case.
Sourcepub const fn min() -> Self
pub const fn min() -> Self
A PdfPoints object with the smallest addressable finite negative value.
In theory, this should be f32::MIN; in practice, values approaching f32::MIN are handled inconsistently by Pdfium, so this value is set to an arbitrarily large negative value that does not approach f32::MIN but should more than suffice for every use case.
Sourcepub fn from_inches(inches: f32) -> Self
pub fn from_inches(inches: f32) -> Self
Creates a new PdfPoints object from the given measurement in inches.
Sourcepub fn from_cm(cm: f32) -> Self
pub fn from_cm(cm: f32) -> Self
Creates a new PdfPoints object from the given measurement in centimeters.
Trait Implementations§
Source§impl AddAssign for PdfPoints
impl AddAssign for PdfPoints
Source§fn add_assign(&mut self, rhs: PdfPoints)
fn add_assign(&mut self, rhs: PdfPoints)
+= operation. Read moreSource§impl Ord for PdfPoints
impl Ord for PdfPoints
Source§impl PartialOrd for PdfPoints
impl PartialOrd for PdfPoints
Source§impl SubAssign for PdfPoints
impl SubAssign for PdfPoints
Source§fn sub_assign(&mut self, rhs: PdfPoints)
fn sub_assign(&mut self, rhs: PdfPoints)
-= operation. Read moreimpl Copy for PdfPoints
impl Eq for PdfPoints
impl StructuralPartialEq for PdfPoints
Auto Trait Implementations§
impl Freeze for PdfPoints
impl RefUnwindSafe for PdfPoints
impl Send for PdfPoints
impl Sync for PdfPoints
impl Unpin for PdfPoints
impl UnwindSafe for PdfPoints
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
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>
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>
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