public class ResourceVectorImage extends VectorImage implements Closeable
A resource vector image must be closed in order to free the dynamic allocation used to store the image data.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this vector image and its associated resources.
|
boolean |
isClosed()
Returns whether this vector image has been closed or not.
|
static ResourceVectorImage |
loadImage(String resourcePath)
Loads a vector image from a path.
|
filterImage, getDuration, getHeight, getImage, getWidthpublic void close()
Calling this method on a vector image which has already been closed has no effect.
close in interface Closeableclose in interface AutoCloseablepublic boolean isClosed()
true if the vector image has been closed, false otherwise.public static ResourceVectorImage loadImage(String resourcePath)
This method can load images which are in the internal image format defined by the MicroVG implementation. The
caller is responsible for calling close() on the returned image when it is no longer
used.
resourcePath - the path to get the image fromVectorGraphicsException - if the image could not be retrieved for any reason (see
VectorGraphicsException.getErrorCode())