pub struct WasmMat { /* private fields */ }
Expand description
WebAssembly-compatible Mat wrapper
Implementations§
Source§impl WasmMat
impl WasmMat
pub fn new(width: i32, height: i32) -> Result<WasmMat, JsValue>
pub fn width(&self) -> i32
pub fn height(&self) -> i32
pub fn channels(&self) -> i32
pub fn empty(&self) -> bool
Sourcepub fn roi(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
) -> Result<WasmMat, JsValue>
pub fn roi( &self, x: i32, y: i32, width: i32, height: i32, ) -> Result<WasmMat, JsValue>
Get region of interest
Sourcepub fn to_image_data(&self) -> Result<ImageData, JsValue>
pub fn to_image_data(&self) -> Result<ImageData, JsValue>
Convert to ImageData for canvas rendering
Trait Implementations§
Source§impl FromWasmAbi for WasmMat
impl FromWasmAbi for WasmMat
Source§impl IntoWasmAbi for WasmMat
impl IntoWasmAbi for WasmMat
Source§impl LongRefFromWasmAbi for WasmMat
impl LongRefFromWasmAbi for WasmMat
Source§impl OptionFromWasmAbi for WasmMat
impl OptionFromWasmAbi for WasmMat
Source§impl OptionIntoWasmAbi for WasmMat
impl OptionIntoWasmAbi for WasmMat
Source§impl RefFromWasmAbi for WasmMat
impl RefFromWasmAbi for WasmMat
Source§impl RefMutFromWasmAbi for WasmMat
impl RefMutFromWasmAbi for WasmMat
Source§impl TryFromJsValue for WasmMat
impl TryFromJsValue for WasmMat
Source§impl VectorFromWasmAbi for WasmMat
impl VectorFromWasmAbi for WasmMat
Source§impl VectorIntoWasmAbi for WasmMat
impl VectorIntoWasmAbi for WasmMat
impl SupportsConstructor for WasmMat
impl SupportsInstanceProperty for WasmMat
impl SupportsStaticProperty for WasmMat
Auto Trait Implementations§
impl Freeze for WasmMat
impl RefUnwindSafe for WasmMat
impl Send for WasmMat
impl Sync for WasmMat
impl Unpin for WasmMat
impl UnwindSafe for WasmMat
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.