Trait script::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::ImageData_Binding::ImageDataMethods
source · pub trait ImageDataMethods<D: DomTypes> {
// Required methods
fn Width(&self) -> u32;
fn Height(&self) -> u32;
fn GetData(&self, cx: SafeJSContext) -> Result<Uint8ClampedArray, Error>;
fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
sw: u32,
sh: u32,
) -> Result<Root<Dom<ImageData>>, Error>;
fn Constructor_(
cx: SafeJSContext,
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
data: *mut JSObject,
sw: u32,
sh: Option<u32>,
) -> Result<Root<Dom<ImageData>>, Error>;
}
Required Methods§
fn Width(&self) -> u32
fn Height(&self) -> u32
fn GetData(&self, cx: SafeJSContext) -> Result<Uint8ClampedArray, Error>
fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, sw: u32, sh: u32, ) -> Result<Root<Dom<ImageData>>, Error>
fn Constructor_( cx: SafeJSContext, global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, data: *mut JSObject, sw: u32, sh: Option<u32>, ) -> Result<Root<Dom<ImageData>>, Error>
Object Safety§
This trait is not object safe.