pub struct Buffer { /* private fields */ }Expand description
An LVGL draw buffer: len pixels in the rendering colour format, aligned
to DRAW_BUFFER_ALIGNMENT.
Implementations§
Source§impl Buffer
impl Buffer
pub fn new_from_resolution(resolution: &Point) -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Size of the pixels in bytes, as LVGL renders into them.
Sourcepub fn as_mutable_pointer(&mut self) -> *mut RenderingColor
pub fn as_mutable_pointer(&mut self) -> *mut RenderingColor
The start of the buffer, for LVGL to render into. It is aligned to
DRAW_BUFFER_ALIGNMENT, and the allocation does not move when the
Buffer does.
Trait Implementations§
Source§impl AsRef<[ColorARGB8888]> for Buffer
impl AsRef<[ColorARGB8888]> for Buffer
Source§fn as_ref(&self) -> &[RenderingColor] ⓘ
fn as_ref(&self) -> &[RenderingColor] ⓘ
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more