pub struct Canvas { /* private fields */ }
Implementations§
Source§impl Canvas
impl Canvas
pub fn simple( width: u32, height: u32, format: GlowTextureFormat, graphics: &Graphics<Vertex>, ) -> Result<Self, String>
pub fn from_surface(surface: Surface) -> Self
pub fn from_screen( texture_formats: Vec<GlowTextureFormat>, graphics: &Graphics<Vertex>, ) -> Result<Self, String>
pub fn color(self, color: [f32; 4]) -> Self
pub fn match_to_screen( &mut self, graphics: &Graphics<Vertex>, ) -> Result<(), String>
pub fn activate( &self, context: &mut DrawContext, graphics: &mut Graphics<Vertex>, clear: bool, )
pub fn deactivate(context: &mut DrawContext, graphics: &mut Graphics<Vertex>)
pub fn with<R>( &self, context: &mut DrawContext, graphics: &mut Graphics<Vertex>, clear: bool, f: impl FnMut(&mut DrawContext, &mut Graphics<Vertex>) -> R, ) -> R
pub fn surface(&self) -> &Surface
pub fn surface_mut(&mut self) -> &mut Surface
pub fn sprite_texture( &self, index: usize, sampler: Cow<'static, str>, filtering: GlowTextureFiltering, ) -> Option<SpriteTexture>
Auto Trait Implementations§
impl Freeze for Canvas
impl !RefUnwindSafe for Canvas
impl !Send for Canvas
impl !Sync for Canvas
impl Unpin for Canvas
impl !UnwindSafe for Canvas
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