[−][src]Struct embedded_graphics_simulator::DisplayBuilder
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
impl Send for DisplayBuilder
impl Sync for DisplayBuilder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,