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, rotation: f64, ) -> Result<()>
Source§fn draw_sprite_frame(
&mut self,
texture: &str,
frame: Option<&str>,
x: f64,
y: f64,
rotation: f64,
) -> Result<()>
fn draw_sprite_frame( &mut self, texture: &str, frame: Option<&str>, x: f64, y: f64, rotation: f64, ) -> Result<()>
Draw
texture, optionally from one named atlas frame, rotated by
rotation radians around the sprite center. The default impl
forwards to draw_sprite, 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 Forget for OffscreenRenderer
impl Freeze for OffscreenRenderer
impl Move 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