fn pixel_blend(
        &mut self,
        x: u32,
        y: u32,
        other_x: u32,
        other_y: u32,
        other_image: Option<&WasmDynamicImage>,
    ) {
        let other_instance = &other_image.unwrap_or(&self).instance;
        let other_pixel = other_instance.get_pixel(other_x, other_y);
        let mut pixel = self.instance.get_pixel(x, y);

        pixel.blend(&other_pixel);
        self.instance.put_pixel(x, y, pixel);
    }
// Would be nice to expose this function directly to JS land
// but Option<> is not supported yet.
// See https://github.com/rustwasm/wasm-bindgen/issues/2370
Would be nice to expose this function directly to JS land
but Option<> is not supported yet.
Would be nice to expose this function directly to JS land but Option< > is not supported yet .
fn pixel_blend(
        &mut self,
        x: u32,
        y: u32,
        other_x: u32,
        other_y: u32,
        other_image: Option<&WasmDynamicImage>,
    ) {
        let other_instance = &other_image.unwrap_or(&self).instance;
        let other_pixel = other_instance.get_pixel(other_x, other_y);
        let mut pixel = self.instance.get_pixel(x, y);
        pixel.blend(&other_pixel);
        self.instance.put_pixel(x, y, pixel);
    }
fn pixel_blend ( & mut self , x : u32 , y : u32 , other_x : u32 , other_y : u32 , other_image : Option < & WasmDynamicImage > , ) { let other_instance = & other_image . unwrap_or ( & self ) . instance ; let other_pixel = other_instance . get_pixel ( other_x , other_y ) ; let mut pixel = self . instance . get_pixel ( x , y ) ; pixel . blend ( & other_pixel ) ; self . instance . put_pixel ( x , y , pixel ) ; }
Would be nice to expose this function directly to JS land
but Option<> is not supported yet.
Would be nice to expose this function directly to JS land but Option< > is not supported yet .
&mut self
x
u32
y
u32
other_x
u32
other_y
u32
other_image
Option<&WasmDynamicImage>
&mut self
x
u32
y
u32
other_x
u32
other_y
u32
other_image
Option<&WasmDynamicImage>