pub struct Canvas { /* private fields */ }
Implementations§
Source§impl Canvas
impl Canvas
pub fn new(size: Vector2F) -> Canvas
pub fn from_scene(scene: Scene) -> Canvas
pub fn into_scene(self) -> Scene
pub fn get_context_2d( self, canvas_font_context: CanvasFontContext, ) -> CanvasRenderingContext2D
pub fn size(&self) -> Vector2I
Trait Implementations§
Source§impl CanvasImageSource for Canvas
impl CanvasImageSource for Canvas
fn to_pattern( self, dest_context: &mut CanvasRenderingContext2D, transform: Transform2F, ) -> Pattern
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more