[][src]Struct embedded_graphics_simulator::DisplayBuilder

pub struct DisplayBuilder { /* fields omitted */ }

Create a simulator display using the builder pattern

Methods

impl DisplayBuilder[src]

pub fn new() -> Self[src]

Create a new display with default settings

pub fn size(&mut self, width: usize, height: usize) -> &mut Self[src]

Set the width/height of the display in pixels

pub fn scale(&mut self, scale: usize) -> &mut Self[src]

Set the pixel scale

A scale of 2 or higher is useful for viewing the simulator on high DPI displays

pub fn theme(&mut self, theme: DisplayTheme) -> &mut Self[src]

Set the theme for the display to use

pub fn pixel_spacing(&mut self, pixel_spacing: usize) -> &mut Self[src]

Add a gap between pixels, simulating the same effect of a physical display

pub fn build(&self) -> Display[src]

Finish building the simulated display and open an SDL window to render it into

Auto Trait Implementations

Blanket Implementations

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

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

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.

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

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

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