Struct pdfium_render::points::PdfPoints
source · 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 PartialEq for PdfPoints
impl PartialEq for PdfPoints
source§impl PartialOrd for PdfPoints
impl PartialOrd for PdfPoints
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§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 more