pub struct RenderSettings {
pub x_scale: f32,
pub y_scale: f32,
pub width: Option<u16>,
pub height: Option<u16>,
pub bg_color: AlphaColor<Srgb>,
}Expand description
Settings to apply during rendering.
Fields§
§x_scale: f32How much the contents should be scaled into the x direction.
y_scale: f32How much the contents should be scaled into the y direction.
width: Option<u16>The width of the viewport. If this is set to None, the width will be chosen
automatically based on the scale factor and the dimensions of the PDF.
height: Option<u16>The height of the viewport. If this is set to None, the height will be chosen
automatically based on the scale factor and the dimensions of the PDF.
bg_color: AlphaColor<Srgb>The background color. Determines the color of the base rectangle during rendering to a pixmap.
Trait Implementations§
Source§impl Clone for RenderSettings
impl Clone for RenderSettings
Source§fn clone(&self) -> RenderSettings
fn clone(&self) -> RenderSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for RenderSettings
impl Default for RenderSettings
impl Copy for RenderSettings
Auto Trait Implementations§
impl Freeze for RenderSettings
impl RefUnwindSafe for RenderSettings
impl Send for RenderSettings
impl Sync for RenderSettings
impl Unpin for RenderSettings
impl UnsafeUnpin for RenderSettings
impl UnwindSafe for RenderSettings
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().