pub struct OffscreenCanvas { /* private fields */ }
Implementations§
Source§impl OffscreenCanvas
impl OffscreenCanvas
pub fn new() -> Self
pub fn from_canvas<C>(canvas: &C) -> Selfwhere
C: Canvas,
pub fn from_texture<T>(texture: &T) -> Selfwhere
T: Texture,
Trait Implementations§
Source§impl Canvas for OffscreenCanvas
impl Canvas for OffscreenCanvas
fn id(&self) -> i32
fn draw_texture<T: Texture>( &mut self, texture: &T, source: Rect<f32, Pixels>, destination: Rect<f32, Pixels>, )
fn draw_canvas<C: Canvas>( &mut self, canvas: &C, source: Rect<f32, Pixels>, destination: Rect<f32, Pixels>, )
fn resize(&mut self, size: Size2D<u16, Pixels>)
fn clear(&mut self)
fn set_global_alpha(&mut self, alpha: f32)
fn set_global_composite_operation(&mut self, operation: CompositeOperation)
fn size(&self) -> Size2D<u16, Pixels>
fn set_fill_style<S>(&mut self, style: S)
fn set_stroke_style<S>(&mut self, style: S)
fn set_font<S>(&mut self, font: S)
fn set_line_width(&mut self, line_width: Length<f32, Pixels>)
fn fill_text<S>( &mut self, text: S, position: Point2D<f32, Pixels>, max_width: Option<Length<f32, Pixels>>, )
fn stroke_text<S>( &mut self, text: S, position: Point2D<f32, Pixels>, max_width: Option<Length<f32, Pixels>>, )
fn fill_rectangle(&mut self, rectangle: Rect<f32, Pixels>)
fn stroke_rectangle(&mut self, rectangle: Rect<f32, Pixels>)
fn clear_rectangle(&mut self, rectangle: Rect<f32, Pixels>)
Source§impl Clone for OffscreenCanvas
impl Clone for OffscreenCanvas
Source§impl Debug for OffscreenCanvas
impl Debug for OffscreenCanvas
Source§impl Drop for OffscreenCanvas
impl Drop for OffscreenCanvas
Source§impl From<&ImageTexture> for OffscreenCanvas
impl From<&ImageTexture> for OffscreenCanvas
Source§fn from(value: &ImageTexture) -> Self
fn from(value: &ImageTexture) -> Self
Converts to this type from the input type.
Source§impl From<&Screen> for OffscreenCanvas
impl From<&Screen> for OffscreenCanvas
Source§impl From<ImageTexture> for OffscreenCanvas
impl From<ImageTexture> for OffscreenCanvas
Source§fn from(value: ImageTexture) -> Self
fn from(value: ImageTexture) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OffscreenCanvas
impl RefUnwindSafe for OffscreenCanvas
impl Send for OffscreenCanvas
impl Sync for OffscreenCanvas
impl Unpin for OffscreenCanvas
impl UnwindSafe for OffscreenCanvas
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