pub struct OutputSettingsBuilder { /* private fields */ }
Expand description
Output settings builder.
Implementations§
source§impl OutputSettingsBuilder
impl OutputSettingsBuilder
sourcepub fn scale(self, scale: u32) -> Self
pub fn scale(self, scale: u32) -> Self
Sets the pixel scale.
A scale of 2
or higher is useful for viewing the simulator on high DPI displays.
§Panics
Panics if the scale is set to 0
.
sourcepub fn theme(self, theme: BinaryColorTheme) -> Self
pub fn theme(self, theme: BinaryColorTheme) -> Self
Sets the binary color theme.
The binary color theme defines the mapping between the two display colors
and the output. The variants provided by the BinaryColorTheme
enum
simulate the color scheme of commonly used display types.
Most binary color displays are relatively small individual pixels are hard to recognize on higher resolution screens. Because of this some scaling is automatically applied to the output when a theme is set and no scaling was specified explicitly.
Note that a theme should only be set when an monochrome display is used. Setting a theme when using a color display will cause an corrupted output.
sourcepub fn pixel_spacing(self, pixel_spacing: u32) -> Self
pub fn pixel_spacing(self, pixel_spacing: u32) -> Self
Sets the gap between pixels.
Most lower resolution displays have visible gaps between individual pixels.
This effect can be simulated by setting the pixel spacing to a value greater
than 0
.
sourcepub fn build(self) -> OutputSettings
pub fn build(self) -> OutputSettings
Builds the output settings.
Auto Trait Implementations§
impl Freeze for OutputSettingsBuilder
impl RefUnwindSafe for OutputSettingsBuilder
impl Send for OutputSettingsBuilder
impl Sync for OutputSettingsBuilder
impl Unpin for OutputSettingsBuilder
impl UnwindSafe for OutputSettingsBuilder
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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>
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>
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