pub struct Page {
pub number: u32,
pub side: Side,
pub width: f32,
pub height: f32,
pub bleed: f32,
pub slug: f32,
pub sections: Vec<NodeId>,
pub items: Vec<DrawItem>,
pub links: Vec<Link>,
}Expand description
One typeset page: a number, a side, a trim size, and what to paint on it.
Coordinates are measured from the top left corner of the trim, so
a page with a bleed has items at negative coordinates and past its
width and height. The sheet a printer gets is the trim grown by
bleed + slug on every edge.
Fields§
§number: u32Folio, counting from 1.
side: SideWhich side of the spread this page falls on.
width: f32Trimmed page width in points.
height: f32Trimmed page height in points.
bleed: f32How far past the trim the page background reaches, in points, on every edge. Art that runs to the edge of the finished page runs this far past it, so a cut that drifts still leaves no white edge. Zero on a page with no bleed.
slug: f32How far past the bleed the sheet reaches, in points, on every edge: the room crop marks and registration marks are painted in. Zero on a page with no marks.
sections: Vec<NodeId>The sections whose content appears on this page, in the order their content appears on it. A chapter that ends mid-page is followed there by the next one opening, so the page names both. A blank leaf names none.
items: Vec<DrawItem>What to paint, in paint order: by layer, and inside one layer in the order the blocks are written.
links: Vec<Link>The links set on this page, in the order their text is painted. Empty on a page with no link.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Page
impl<'de> Deserialize<'de> for Page
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Page
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnsafeUnpin for Page
impl UnwindSafe for Page
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.