pub struct Window { /* private fields */ }framebuffer only.Expand description
A window of the GRAM that covers a pixel rectangle grown to the panel grid: 2 pixels horizontally and 12 pixels vertically.
Coordinates are native (not rotated). The window gives the arguments of
set_address_window and, with
FrameBuffer::copy_window, the bytes for the following
RAMWR. The grid and the byte order were verified on the Waveshare 4.2“ panel
(presets::waveshare_rlcd_42); for other panels this
is an assumption.
Implementations§
Source§impl Window
impl Window
Sourcepub fn covering<M: PixelMap>(area: Rectangle) -> Option<Self>
pub fn covering<M: PixelMap>(area: Rectangle) -> Option<Self>
The smallest window of the panel M that contains area clipped to the panel, None
if nothing of area is on the panel.
The panel width must be even and its height a multiple of 12, otherwise the last band is cut.
Sourcepub fn full<M: PixelMap>() -> Self
pub fn full<M: PixelMap>() -> Self
The window of the whole panel M: the GRAM window of a full frame.
Sourcepub const fn bounds(&self) -> Rectangle
pub const fn bounds(&self) -> Rectangle
The pixels the window really covers (native coordinates).
Sourcepub fn column_address_set(&self) -> ColumnAddressSet
pub fn column_address_set(&self) -> ColumnAddressSet
Argument of set_address_window.
Sourcepub fn row_address_set(&self) -> RowAddressSet
pub fn row_address_set(&self) -> RowAddressSet
Argument of set_address_window.