pub struct RenderRequest {
pub page: u32,
pub scale: f32,
pub clip: Option<PixelRect>,
pub rotation: Rotation,
pub flags: RenderFlags,
pub background: Option<Rgba8>,
pub appearance: PageAppearance,
pub hidden_annotations: Vec<u32>,
}Expand description
One render: a page, a scale, an optional tile, a view rotation, flags, a background, the page appearance and the annotations left out.
Added in 0.2.0.
Fields§
§page: u32The page, 0-based (ADR 0027).
scale: f32Output pixels per point, device pixel ratio already applied (1.0 is 72 DPI).
clip: Option<PixelRect>The tile to draw; None is the whole page (still bounded by RenderLimits).
rotation: RotationThe view rotation.
flags: RenderFlagsWhat to draw.
background: Option<Rgba8>The background; None is transparent.
appearance: PageAppearanceHow the page’s colours are drawn (default: its own).
Annotations left out of this render only, each by its place in the page’s /Annots
(default none). An editor hides the annotation it moves, and draws it itself while the
gesture lasts. The place, not /NM, names it: /NM is only a hint and two annotations
may share one. A place past the end of /Annots hides nothing.
Added in 0.5.0.
Implementations§
Source§impl RenderRequest
impl RenderRequest
Sourcepub fn page(page: u32, scale: f32) -> Self
pub fn page(page: u32, scale: f32) -> Self
The whole of page page at scale, upright, default flags, on white.
Added in 0.2.0.
Sourcepub const fn with_rotation(self, rotation: Rotation) -> Self
pub const fn with_rotation(self, rotation: Rotation) -> Self
The view rotation.
Added in 0.2.0.
Sourcepub const fn with_flags(self, flags: RenderFlags) -> Self
pub const fn with_flags(self, flags: RenderFlags) -> Self
The flags.
Added in 0.2.0.
Sourcepub const fn with_background(self, background: Option<Rgba8>) -> Self
pub const fn with_background(self, background: Option<Rgba8>) -> Self
The background (None: transparent).
Added in 0.2.0.
Sourcepub const fn with_appearance(self, appearance: PageAppearance) -> Self
pub const fn with_appearance(self, appearance: PageAppearance) -> Self
The page appearance.
Added in 0.2.0.
Leaves out the annotations at these places in the page’s /Annots, for this render
only (see RenderRequest::hidden_annotations).
Added in 0.5.0.