pub struct RasterizerSettings {
pub render_mode: RenderMode,
pub composite_mode: CompositeMode,
pub pixel_format: PixelFormat,
pub offset: (u16, u16),
}Expand description
Settings used when rasterizing a scene into a pixmap.
Fields§
§render_mode: RenderModeWhether to prioritize speed or quality when rendering.
For most cases (especially for real-time rendering), it is highly recommended to set
this to RenderMode::OptimizeSpeed. If color accuracy is a more significant concern,
then you can set this to RenderMode::OptimizeQuality.
Currently, the only difference this makes is that when choosing RenderMode::OptimizeSpeed,
rasterization will happen using u8/u16,
while RenderMode::OptimizeQuality will use a f32-based pipeline.
composite_mode: CompositeModeHow rendered content is composited into the destination.
pixel_format: PixelFormatPixel format of the destination.
offset: (u16, u16)Offset in destination pixels where the render context origin is placed.
See RenderContext::render_with for more information.
Trait Implementations§
Source§impl Clone for RasterizerSettings
impl Clone for RasterizerSettings
Source§fn clone(&self) -> RasterizerSettings
fn clone(&self) -> RasterizerSettings
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 RasterizerSettings
impl Debug for RasterizerSettings
Source§impl Default for RasterizerSettings
impl Default for RasterizerSettings
Source§impl PartialEq for RasterizerSettings
impl PartialEq for RasterizerSettings
Source§fn eq(&self, other: &RasterizerSettings) -> bool
fn eq(&self, other: &RasterizerSettings) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RasterizerSettings
impl Eq for RasterizerSettings
impl StructuralPartialEq for RasterizerSettings
Auto Trait Implementations§
impl Freeze for RasterizerSettings
impl RefUnwindSafe for RasterizerSettings
impl Send for RasterizerSettings
impl Sync for RasterizerSettings
impl Unpin for RasterizerSettings
impl UnsafeUnpin for RasterizerSettings
impl UnwindSafe for RasterizerSettings
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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