pub struct Canvas { /* private fields */ }Implementations§
Source§impl Canvas
impl Canvas
pub fn new( device: &Device, queue: &Queue, format: TextureFormat, config: CanvasConfig, ) -> Self
pub fn begin<'a>( &'a mut self, physical_size: PhysicalSizeI32, scale_factor: ScaleFactor, ) -> CanvasCtx<'a>
pub fn set_scissor_rect(&mut self, scissor_rect: RectI32)
pub fn reset_scissor_rect(&mut self)
pub fn render_to_target( &mut self, clear_color: Option<PackedSrgb>, device: &Device, queue: &Queue, encoder: &mut CommandEncoder, target: &TextureView, target_size: PhysicalSizeI32, custom_pipelines: &mut [&mut dyn CustomPipeline], ) -> Result<(), RenderError>
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