Package ej.microvg
Class BufferedVectorImage
- java.lang.Object
-
- ej.microvg.VectorImage
-
- ej.microvg.ResourceVectorImage
-
- ej.microvg.BufferedVectorImage
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class BufferedVectorImage extends ResourceVectorImage
A buffered vector image is a vector image that can be built dynamically.It reserves the format
Format.CUSTOM_7from MicroUI.- See Also:
BufferedImage
-
-
Constructor Summary
Constructors Constructor Description BufferedVectorImage(int width, int height)Creates a buffered image that holds the GPU commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears all commands.GraphicsContextgetGraphicsContext()Returns theGraphicsContextassociated with this image, which may be used in order to draw on the image.-
Methods inherited from class ej.microvg.ResourceVectorImage
close, isClosed, loadImage
-
Methods inherited from class ej.microvg.VectorImage
filterImage, getDuration, getHeight, getImage, getWidth
-
-
-
-
Constructor Detail
-
BufferedVectorImage
public BufferedVectorImage(int width, int height)Creates a buffered image that holds the GPU commands.A command is added in the image when the image's
GraphicsContextis used to draw something into.- Parameters:
width- the width of the new image, in pixelsheight- the height of the new image, in pixels- See Also:
BufferedImage.getGraphicsContext()
-
-
Method Detail
-
getGraphicsContext
public GraphicsContext getGraphicsContext()
Returns theGraphicsContextassociated with this image, which may be used in order to draw on the image.This method always returns the same
GraphicsContextinstance for a specific image. The graphics context has the same dimensions as the image.- Returns:
- the image's graphics context.
- Throws:
MicroUIException- if this image has been closed (seeResourceVectorImage.close()).
-
clear
public void clear()
Clears all commands.
-
-