Class BrowserDOM
java.lang.Object
nl.colorize.multimedialib.renderer.teavm.BrowserDOM
Provides access to the browser's DOM contents. This is always available to
the TeaVM renderer, regardless of which graphics library is used.
Note this class is different from Browser
, which can be used to
access the browser's native JavaScript API. The reason these are two
separate classes is purely because TeaVM does not allow "native"
implementations and Java implementations to be mixed within the same class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.teavm.jso.dom.html.HTMLCanvasElement
Creates an alternative version of the image with the specified mask color applied to every non-transparent pixel.org.teavm.jso.dom.html.HTMLCanvasElement
createColorCanvas
(int width, int height, ColorRGB color) org.teavm.jso.dom.html.HTMLCanvasElement
createFullScreenCanvas
(org.teavm.jso.dom.html.HTMLElement container) static nl.colorize.util.http.PostData
Parses the current URL's query string visible in the browser, and returns the result as aPostData
instance.
-
Constructor Details
-
BrowserDOM
public BrowserDOM()
-
-
Method Details
-
createFullScreenCanvas
public org.teavm.jso.dom.html.HTMLCanvasElement createFullScreenCanvas(org.teavm.jso.dom.html.HTMLElement container) -
applyMask
Creates an alternative version of the image with the specified mask color applied to every non-transparent pixel. This is a relatively heavy operation, so masked images are cached to avoid having to create them every single frame. -
createColorCanvas
public org.teavm.jso.dom.html.HTMLCanvasElement createColorCanvas(int width, int height, ColorRGB color) -
getQueryString
public static nl.colorize.util.http.PostData getQueryString()Parses the current URL's query string visible in the browser, and returns the result as aPostData
instance.
-