[−][src]Struct linfb::Framebuffer
Basic object used to manipulate framebuffer. You should normally use Shape and Compositor to draw on it
Fields
screen_info: fb_var_screeninfo
Information about framebuffer
Methods
impl Framebuffer
[src]
pub fn open() -> Result<Self>
[src]
Try to open /dev/fb0
and create Framebuffer object.
It requires root privileges on most systems.
This method will panic if /dev/fb0
is not a framebuffer or it's pixel size is not 32 bits
pub fn flush(&mut self)
[src]
Flush internal buffer contents to the real framebuffer device
pub fn set_pixel<C: Into<Color>>(&mut self, x: u32, y: u32, color: C)
[src]
Set pixel at x, y to color. Alpha value of color is probably will be ignored, as it doesn't makes sense in this context
pub fn draw<T: Shape>(&mut self, x: u32, y: u32, shape: &T)
[src]
Draw shape on internal buffer
pub fn compositor(&self, background: Color) -> Compositor
[src]
Create Compositor object with size of a screen and given background color
Auto Trait Implementations
impl Send for Framebuffer
impl Sync for Framebuffer
impl Unpin for Framebuffer
impl UnwindSafe for Framebuffer
impl RefUnwindSafe for Framebuffer
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,