[][src]Struct linfb::Framebuffer

pub struct Framebuffer {
    pub screen_info: fb_var_screeninfo,
    // some fields omitted
}

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

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

impl<T> Downcast for T where
    T: Any
[src]