pub struct Context { /* private fields */ }
Expand description
Pel Context accessible in Events
.
Implementations§
Source§impl Context
impl Context
Sourcepub fn texture(&mut self) -> TextureHandle<'_>
pub fn texture(&mut self) -> TextureHandle<'_>
Returns handle to window pel texture, allowing direct modification.
Ideally, should only be accessed once in Events::draw
.
See documentation of TextureHandle
for more information.
Sourcepub fn resize_texture(&mut self, w: usize, h: usize)
pub fn resize_texture(&mut self, w: usize, h: usize)
Resizes window pel texture.
Size is specified in logical pixels.
Auto Trait Implementations§
impl !Freeze for Context
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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