|Constructor and Description|
Creates a buffered image.
|Modifier and Type||Method and Description|
canLoadImage, close, isClosed, loadImage, loadImage, loadImage, loadImage
canGetImage, getHeight, getImage, getSNIContext, getWidth, isTransparent, readPixel, readPixels
public BufferedImage(int width, int height)
The new image is initialized with unspecified pixel data. The output format of the new image matches the pixel organization (layout, depth, etc.) of the default display.
Creating images is not supported by every MicroUI implementation. If the MicroUI implementation does not support
the allocation of memory in order to store the pixel buffer, a
MicroUIException is thrown.
width- the width of the new image, in pixels.
height- the height of the new image, in pixels.
IllegalArgumentException- if either
heightis negative or zero.
MicroUIException- if the image could not be created.
MicroUIException- if MicroUI is not started.
SecurityException- if a security manager exists and does not allow the caller to create an image.
public GraphicsContext getGraphicsContext()
GraphicsContextassociated with this image, which may be used in order to draw on the image.
This method always returns the same
GraphicsContext instance for a specific image. The graphics context
has the same dimensions as the image, which allows to modify every pixel of the image.