pub struct PageGeometry {
pub media_box: PageBox,
pub crop_box: PageBox,
pub trim_box: Option<PageBox>,
pub bleed_box: Option<PageBox>,
pub art_box: Option<PageBox>,
pub rotation: PageRotation,
}Expand description
Complete geometry for a single page.
Fields§
§media_box: PageBoxMediaBox (required, fallback to A4).
crop_box: PageBoxCropBox (defaults to MediaBox).
trim_box: Option<PageBox>TrimBox if present.
bleed_box: Option<PageBox>BleedBox if present.
art_box: Option<PageBox>ArtBox if present.
rotation: PageRotationPage rotation.
Implementations§
Source§impl PageGeometry
impl PageGeometry
Sourcepub fn effective_dimensions(&self) -> (f64, f64)
pub fn effective_dimensions(&self) -> (f64, f64)
Effective visible dimensions in points, accounting for rotation.
Sourcepub fn pixel_dimensions(&self, dpi: f64) -> (u32, u32)
pub fn pixel_dimensions(&self, dpi: f64) -> (u32, u32)
Effective visible dimensions in pixels at the given DPI.
Trait Implementations§
Source§impl Clone for PageGeometry
impl Clone for PageGeometry
Source§fn clone(&self) -> PageGeometry
fn clone(&self) -> PageGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PageGeometry
impl RefUnwindSafe for PageGeometry
impl Send for PageGeometry
impl Sync for PageGeometry
impl Unpin for PageGeometry
impl UnsafeUnpin for PageGeometry
impl UnwindSafe for PageGeometry
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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