Struct sdl_client::renderer::RenderingContext
source · [−]pub struct RenderingContext<'frame, 'texture_creator> {
pub canvas: &'frame mut Canvas<Window>,
pub font_texture: &'frame mut FontTexture<'texture_creator>,
pub fonts: &'frame [Font],
}Expand description
Utility functions for drawing. This struct owns the main things required for any drawing.
Fields
canvas: &'frame mut Canvas<Window>font_texture: &'frame mut FontTexture<'texture_creator>fonts: &'frame [Font]Implementations
sourceimpl RenderingContext<'_, '_>
impl RenderingContext<'_, '_>
sourcepub fn draw_notification(&mut self, text: &str, nth: i32)
pub fn draw_notification(&mut self, text: &str, nth: i32)
Draws a box with some text in the top-left corner of the screen.
Auto Trait Implementations
impl<'frame, 'texture_creator> RefUnwindSafe for RenderingContext<'frame, 'texture_creator>
impl<'frame, 'texture_creator> !Send for RenderingContext<'frame, 'texture_creator>
impl<'frame, 'texture_creator> !Sync for RenderingContext<'frame, 'texture_creator>
impl<'frame, 'texture_creator> Unpin for RenderingContext<'frame, 'texture_creator> where
'texture_creator: 'frame,
impl<'frame, 'texture_creator> !UnwindSafe for RenderingContext<'frame, 'texture_creator>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more