[][src]Struct embedded_graphics_simulator::OutputSettingsBuilder

pub struct OutputSettingsBuilder { /* fields omitted */ }

Output settings builder.

Implementations

impl OutputSettingsBuilder[src]

pub fn new() -> Self[src]

Creates new output settings builder.

pub fn scale(self, scale: u32) -> Self[src]

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.

pub fn theme(self, theme: BinaryColorTheme) -> Self[src]

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.

pub fn pixel_spacing(self, pixel_spacing: u32) -> Self[src]

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.

pub fn build(self) -> OutputSettings[src]

Builds the output settings.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.