Struct qwac::texture::ImageTexture
source · pub struct ImageTexture { /* private fields */ }
Implementations§
source§impl ImageTexture
impl ImageTexture
pub async fn from_canvas<C>(canvas: &C) -> Result<Self, CreateTextureError>where
C: Canvas,
pub fn from_canvas_callback<C, F>(canvas: &C, callback: F)
pub async fn from_rgba<P>( pixels: P, width: u32, height: u32 ) -> Result<Self, CreateTextureError>
pub fn from_rgba_callback<P, F>(pixels: P, width: u32, height: u32, callback: F)
pub async fn from_file<D, M>( data: D, mime_type: M ) -> Result<Self, CreateTextureError>
pub fn from_file_callback<D, M, F>(data: D, mime_type: M, callback: F)
sourcepub async fn from_pixels<P>(
pixels: P,
width: u32,
height: u32
) -> Result<Self, CreateTextureError>
pub async fn from_pixels<P>( pixels: P, width: u32, height: u32 ) -> Result<Self, CreateTextureError>
Build the texture from individual pixels.
sourcepub fn from_pixels_callback<P, F>(
pixels: P,
width: u32,
height: u32,
callback: F
)
pub fn from_pixels_callback<P, F>( pixels: P, width: u32, height: u32, callback: F )
Build the texture from individual pixels.
Trait Implementations§
source§impl Debug for ImageTexture
impl Debug for ImageTexture
source§impl Drop for ImageTexture
impl Drop for ImageTexture
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<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 RefUnwindSafe for ImageTexture
impl Send for ImageTexture
impl Sync for ImageTexture
impl Unpin for ImageTexture
impl UnwindSafe for ImageTexture
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