-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathHTMLImageElement.java
More file actions
55 lines (45 loc) · 1.31 KB
/
HTMLImageElement.java
File metadata and controls
55 lines (45 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package snap.webapi;
/**
* This class is a wrapper for Web API HTMLImageElement (https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement).
*/
public class HTMLImageElement extends HTMLElement implements CanvasImageSource {
/**
* Constructor.
*/
public HTMLImageElement(Object jsObj)
{
super(jsObj);
}
/**
* Returns the image source.
*/
public String getSrc() { return getMemberString("src"); }
/**
* Sets the image source.
*/
public void setSrc(String aSrc) { setMemberString("src", aSrc); }
/**
* Return image width.
*/
public int getWidth() { return getMemberInt("width"); }
/**
* Set image height.
*/
public void setWidth(int aValue) { setMemberInt("width", aValue); }
/**
* Return image height.
*/
public int getHeight() { return getMemberInt("height"); }
/**
* Set image height.
*/
public void setHeight(int aValue) { setMemberInt("height", aValue);}
/**
* Returns the HTMLImageElement crossOrigin property.
*/
public String getCrossOrigin() { return getMemberString("crossOrigin"); }
/**
* Sets the HTMLImageElement crossOrigin property.
*/
public void setCrossOrigin(String aString) { setMemberString("crossOrigin", aString); }
}