pub struct KoboFramebuffer1 {Show 18 fields
file: File,
frame: *mut c_void,
frame_size: size_t,
token: u32,
flags: u32,
monochrome: bool,
dithered: bool,
inverted: bool,
transform: fn(u32, u32, Color) -> Color,
set_pixel_rgb: fn(&mut KoboFramebuffer1, u32, u32, [u8; 3]),
get_pixel_rgb: fn(&KoboFramebuffer1, u32, u32) -> [u8; 3],
as_rgb: fn(&KoboFramebuffer1) -> Vec<u8>,
red_index: usize,
green_index: usize,
blue_index: usize,
bytes_per_pixel: u8,
var_info: VarScreenInfo,
fix_info: FixScreenInfo,
}Fields§
§file: File§frame: *mut c_void§frame_size: size_t§token: u32§flags: u32§monochrome: bool§dithered: bool§inverted: bool§transform: fn(u32, u32, Color) -> Color§set_pixel_rgb: fn(&mut KoboFramebuffer1, u32, u32, [u8; 3])§get_pixel_rgb: fn(&KoboFramebuffer1, u32, u32) -> [u8; 3]§as_rgb: fn(&KoboFramebuffer1) -> Vec<u8>§red_index: usize§green_index: usize§blue_index: usize§bytes_per_pixel: u8§var_info: VarScreenInfo§fix_info: FixScreenInfoImplementations§
Trait Implementations§
Source§impl Drop for KoboFramebuffer1
impl Drop for KoboFramebuffer1
Source§impl Framebuffer for KoboFramebuffer1
impl Framebuffer for KoboFramebuffer1
fn set_pixel(&mut self, x: u32, y: u32, color: Color)
fn set_blended_pixel(&mut self, x: u32, y: u32, color: Color, alpha: f32)
fn invert_region(&mut self, rect: &Rectangle)
fn shift_region(&mut self, rect: &Rectangle, drift: u8)
fn update(&mut self, rect: &Rectangle, mode: UpdateMode) -> Result<u32, Error>
fn wait(&self, token: u32) -> Result<i32, Error>
fn save(&self, path: &str) -> Result<(), Error>
fn rotation(&self) -> i8
fn set_rotation(&mut self, n: i8) -> Result<(u32, u32), Error>
fn set_inverted(&mut self, enable: bool)
fn inverted(&self) -> bool
fn set_monochrome(&mut self, enable: bool)
fn monochrome(&self) -> bool
fn set_dithered(&mut self, enable: bool)
fn dithered(&self) -> bool
fn width(&self) -> u32
fn height(&self) -> u32
fn toggle_inverted(&mut self)
fn toggle_monochrome(&mut self)
fn toggle_dithered(&mut self)
fn dims(&self) -> (u32, u32)
fn rect(&self) -> Rectangle
fn clear(&mut self, color: Color)
fn draw_rectangle(&mut self, rect: &Rectangle, color: Color)
fn draw_blended_rectangle(&mut self, rect: &Rectangle, color: Color, alpha: f32)
fn draw_rectangle_outline(&mut self, rect: &Rectangle, border: &BorderSpec)
fn draw_pixmap(&mut self, pixmap: &Pixmap, pt: Point)
fn draw_framed_pixmap(&mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point)
fn draw_framed_pixmap_contrast( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, exponent: f32, gray: f32, )
fn draw_framed_pixmap_halftone( &mut self, pixmap: &Pixmap, rect: &Rectangle, pt: Point, )
fn draw_blended_pixmap(&mut self, pixmap: &Pixmap, pt: Point, color: Color)
fn draw_rounded_rectangle( &mut self, rect: &Rectangle, corners: &CornerSpec, color: Color, )
fn draw_rounded_rectangle_with_border( &mut self, rect: &Rectangle, corners: &CornerSpec, border: &BorderSpec, color: &dyn ColorSource, )
fn draw_triangle(&mut self, triangle: &[Point], color: Color)
fn draw_disk(&mut self, center: Point, radius: i32, color: Color)
fn draw_segment( &mut self, start: Point, end: Point, start_radius: f32, end_radius: f32, color: Color, )
Auto Trait Implementations§
impl Freeze for KoboFramebuffer1
impl RefUnwindSafe for KoboFramebuffer1
impl !Send for KoboFramebuffer1
impl !Sync for KoboFramebuffer1
impl Unpin for KoboFramebuffer1
impl UnsafeUnpin for KoboFramebuffer1
impl UnwindSafe for KoboFramebuffer1
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more