pub struct Bitmap { /* private fields */ }Implementations§
Source§impl Bitmap
impl Bitmap
pub fn new(width: u32, height: u32) -> Self
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn texture_id(&self) -> u32
pub fn pixels(&self) -> RefMut<'_, Vec<u8>>
pub fn pixel_ptr(&self) -> usize
pub fn canvas(&self) -> DrawContext
pub fn render<T: Node>(&self, node: &T, x: f32, y: f32, scale: f32)
pub fn render_text_layout( &self, layout: &TextLayout, x: f32, y: f32, scale: f32, )
pub fn prepare_text<T: Node>(node: &T)
pub fn on_text_ready<T: Node + Clone + 'static>( &self, node: &T, callback: impl FnOnce(BitmapTextReadyEventArgs) + 'static, ) -> &Self
pub fn dirty_rect(&self, x: u32, y: u32, w: u32, h: u32) -> &Self
pub fn clear_dirty_rects(&self) -> &Self
pub fn has_dirty_rects(&self) -> bool
pub fn commit(&self) -> u32
pub fn dispose(&self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Bitmap
impl !Send for Bitmap
impl !Sync for Bitmap
impl !UnwindSafe for Bitmap
impl Freeze for Bitmap
impl Unpin for Bitmap
impl UnsafeUnpin for Bitmap
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