pub struct OffscreenRenderer { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Renderer2D for OffscreenRenderer
impl Renderer2D for OffscreenRenderer
fn begin_frame(&mut self) -> Result<()>
fn draw_sprite(&mut self, texture: &str, x: f64, y: f64) -> Result<()>
Source§fn draw_sprite_frame(
&mut self,
texture: &str,
frame: Option<&str>,
x: f64,
y: f64,
) -> Result<()>
fn draw_sprite_frame( &mut self, texture: &str, frame: Option<&str>, x: f64, y: f64, ) -> Result<()>
Draw
texture, optionally from one named atlas frame. The default
ignores the frame, so impls without atlas support stay correct.fn draw_rect( &mut self, x: f64, y: f64, w: f64, h: f64, color: [u8; 4], ) -> Result<()>
fn draw_text( &mut self, text: &str, x: f64, y: f64, size: f32, color: [u8; 4], ) -> Result<()>
fn end_frame(&mut self) -> Result<()>
fn set_camera(&mut self, x: f64, y: f64, zoom: f64)
fn reload_asset(&mut self, path: &str)
fn clear_asset_cache(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for OffscreenRenderer
impl !UnwindSafe for OffscreenRenderer
impl Freeze for OffscreenRenderer
impl Send for OffscreenRenderer
impl Sync for OffscreenRenderer
impl Unpin for OffscreenRenderer
impl UnsafeUnpin for OffscreenRenderer
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