java.lang.Object
org.htmlunit.platform.Platform
Singleton to handle JDK specific stuff.
This is required to support at least the differences with android.
- Author:
- Ronald Brill, Sven Strickroth
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageDatabuildImageData(InputStream inputStream) Creates anImageDatainstance by reading image data from the specified input stream.static FontUtilReturns the shared font utility instance.static RenderingBackendgetRenderingBackend(int imageWidth, int imageHeight) Creates a rendering backend for an image with the specified dimensions.
-
Method Details
-
getRenderingBackend
Creates a rendering backend for an image with the specified dimensions.- Parameters:
imageWidth- the width of the imageimageHeight- the height of the image- Returns:
- a new
RenderingBackendinstance, or aNoOpRenderingBackendif theAwtRenderingBackendcannot be created
-
getFontUtil
Returns the shared font utility instance.- Returns:
- the shared
FontUtilinstance, or aNoOpFontUtilif theAwtFontUtilcannot be created
-
buildImageData
Creates anImageDatainstance by reading image data from the specified input stream.- Parameters:
inputStream- theInputStreamto read from- Returns:
- a new
ImageDatainstance created from the specified input stream, or aNoOpImageDataif image processing is unavailable - Throws:
IOException- if an I/O error occurs while reading the image data
-