Skip to main content

WindowedDrawTarget

Trait WindowedDrawTarget 

Source
pub trait WindowedDrawTarget: DrawTarget {
    // Required method
    fn set_window(&mut self, area: &Rectangle) -> Result<(), Self::Error>;
}
Expand description

Partial-present capability for a DrawTarget.

Display controllers with a column/row address window (SSD1357, ST7789, ILI9341, …) can accept a sub-rectangle of pixels and leave the rest of the panel untouched. On a slow bus that is the difference between pushing a whole frame and pushing the handful of rows that actually changed.

Implementors set the controller’s address window; the subsequent pixel writes are expected to fill area in row-major order.

Required Methods§

Source

fn set_window(&mut self, area: &Rectangle) -> Result<(), Self::Error>

Restricts subsequent pixel writes to area.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§