pub struct PageGeometry {
pub paper_width: Length,
pub paper_height: Length,
pub text_origin: (Length, Length),
pub text_width: Length,
pub text_height: Length,
}Expand description
Page geometry (A4 with even margins by default).
Fields§
§paper_width: Length§paper_height: Length§text_origin: (Length, Length)Top-left corner of the text area.
text_width: Length§text_height: LengthImplementations§
Source§impl PageGeometry
impl PageGeometry
Sourcepub fn for_paper(paper_width: Length, paper_height: Length) -> PageGeometry
pub fn for_paper(paper_width: Length, paper_height: Length) -> PageGeometry
Build a geometry from page’s paper dimensions. Only
paper_width/paper_height are read by the PDF writer; the text_*
fields are vestigial here — each page’s real text area lives in its
PlacedLine coordinates, set per page by the content scheme
(chop_page’s caller).
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 moreSource§impl Debug for PageGeometry
impl Debug for PageGeometry
Source§impl Default for PageGeometry
impl Default for PageGeometry
Source§impl PartialEq for PageGeometry
impl PartialEq for PageGeometry
impl StructuralPartialEq for PageGeometry
Auto 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