mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
parent
306c78459c
commit
03c70e3a06
|
@ -15,20 +15,30 @@
|
||||||
*/
|
*/
|
||||||
package org.teavm.jso.canvas;
|
package org.teavm.jso.canvas;
|
||||||
|
|
||||||
|
import org.teavm.jso.JSBody;
|
||||||
import org.teavm.jso.JSObject;
|
import org.teavm.jso.JSObject;
|
||||||
import org.teavm.jso.JSProperty;
|
import org.teavm.jso.JSProperty;
|
||||||
import org.teavm.jso.typedarrays.Uint8ClampedArray;
|
import org.teavm.jso.typedarrays.Uint8ClampedArray;
|
||||||
|
|
||||||
public interface ImageData extends JSObject {
|
public abstract class ImageData implements JSObject {
|
||||||
@JSProperty
|
private ImageData() {
|
||||||
int getWidth();
|
}
|
||||||
|
|
||||||
@JSProperty
|
@JSProperty
|
||||||
int getHeight();
|
public abstract int getWidth();
|
||||||
|
|
||||||
@JSProperty
|
@JSProperty
|
||||||
Uint8ClampedArray getData();
|
public abstract int getHeight();
|
||||||
|
|
||||||
@JSProperty
|
@JSProperty
|
||||||
void setData(Uint8ClampedArray data);
|
public abstract Uint8ClampedArray getData();
|
||||||
|
|
||||||
|
@JSBody(params = { "array", "width" }, script = "return new ImageData(array, width);")
|
||||||
|
public static native ImageData create(Uint8ClampedArray array, int width);
|
||||||
|
|
||||||
|
@JSBody(params = { "width", "height" }, script = "return new ImageData(width, height);")
|
||||||
|
public static native ImageData create(int width, int height);
|
||||||
|
|
||||||
|
@JSBody(params = { "array", "width", "height" }, script = "return new ImageData(array, width, height);")
|
||||||
|
public static native ImageData create(Uint8ClampedArray array, int width, int height);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user