[−][src]Struct sh1106::mode::graphics::GraphicsMode
Graphics mode handler
Implementations
impl<DI> GraphicsMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
pub fn clear(&mut self)
[src]
Clear the display buffer. You need to call disp.flush()
for any effect on the screen
pub fn reset<RST, DELAY, PinE>(
&mut self,
rst: &mut RST,
delay: &mut DELAY
) -> Result<(), Error<(), PinE>> where
RST: OutputPin<Error = PinE>,
DELAY: DelayMs<u8>,
[src]
&mut self,
rst: &mut RST,
delay: &mut DELAY
) -> Result<(), Error<(), PinE>> where
RST: OutputPin<Error = PinE>,
DELAY: DelayMs<u8>,
Reset display
pub fn flush(&mut self) -> Result<(), DI::Error>
[src]
Write out data to display
pub fn set_pixel(&mut self, x: u32, y: u32, value: u8)
[src]
Turn a pixel on or off. A non-zero value
is treated as on, 0
as off. If the X and Y
coordinates are out of the bounds of the display, this method call is a noop.
pub fn init(&mut self) -> Result<(), DI::Error>
[src]
Display is set up in column mode, i.e. a byte walks down a column of 8 pixels from column 0 on the left, to column n on the right
pub fn get_dimensions(&self) -> (u8, u8)
[src]
Get display dimensions, taking into account the current rotation of the display
pub fn set_rotation(&mut self, rot: DisplayRotation) -> Result<(), DI::Error>
[src]
Set the display rotation
pub fn set_contrast(&mut self, contrast: u8) -> Result<(), DI::Error>
[src]
Set the display contrast
Trait Implementations
impl<DI> DisplayModeTrait<DI> for GraphicsMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
pub fn new(properties: DisplayProperties<DI>) -> Self
[src]
Create new GraphicsMode instance
pub fn release(self) -> DisplayProperties<DI>
[src]
Release all resources used by GraphicsMode
impl<DI> DrawTarget<BinaryColor> for GraphicsMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
type Error = DI::Error
Error type to return when a drawing operation fails. Read more
pub fn draw_pixel(
&mut self,
pixel: Pixel<BinaryColor>
) -> Result<(), Self::Error>
[src]
&mut self,
pixel: Pixel<BinaryColor>
) -> Result<(), Self::Error>
pub fn size(&self) -> Size
[src]
pub fn draw_iter<T>(&mut self, item: T) -> Result<(), Self::Error> where
T: IntoIterator<Item = Pixel<C>>,
[src]
T: IntoIterator<Item = Pixel<C>>,
pub fn clear(&mut self, color: C) -> Result<(), Self::Error>
[src]
pub fn draw_line(
&mut self,
item: &Styled<Line, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Line, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
pub fn draw_triangle(
&mut self,
item: &Styled<Triangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Triangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
pub fn draw_rectangle(
&mut self,
item: &Styled<Rectangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Rectangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
pub fn draw_circle(
&mut self,
item: &Styled<Circle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Circle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
pub fn draw_image<'b, I>(
&mut self,
item: &'a Image<'b, I, C>
) -> Result<(), Self::Error> where
C: PixelColor + From<<C as PixelColor>::Raw>,
I: ImageDimensions,
&'b I: IntoPixelIter<C>,
[src]
&mut self,
item: &'a Image<'b, I, C>
) -> Result<(), Self::Error> where
C: PixelColor + From<<C as PixelColor>::Raw>,
I: ImageDimensions,
&'b I: IntoPixelIter<C>,
Auto Trait Implementations
impl<DI> Send for GraphicsMode<DI> where
DI: Send,
[src]
DI: Send,
impl<DI> Sync for GraphicsMode<DI> where
DI: Sync,
[src]
DI: Sync,
impl<DI> Unpin for GraphicsMode<DI> where
DI: Unpin,
[src]
DI: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,