public class VectorGraphicsHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,ImageWrapper> |
svgToRasterImgCache
Map to store cached images to simplify the scaling image usage.
|
| Constructor and Description |
|---|
VectorGraphicsHelper() |
| Modifier and Type | Method and Description |
|---|---|
static ImageWrapper |
getScalableImage(java.io.InputStream is,
int width,
int height,
boolean antialias)
Gets the bitmap image from svg input stream.
|
static ImageWrapper |
getScalableImage(java.lang.String name,
int width,
int height)
Gets the new image data byte array for prepackaged scalable images.
|
static ImageWrapper |
getScalableImage(java.lang.String name,
java.lang.String location,
int width,
int height)
Gets the new image data byte array for prepackaged scalable images.
|
static ImageWrapper |
getScalableImage(java.lang.String name,
java.lang.String location,
int width,
int height,
boolean antialias)
Gets the new image data byte array for prepackaged scalable images.
|
private static java.util.Map<java.lang.String,ImageWrapper> svgToRasterImgCache
public static ImageWrapper getScalableImage(java.lang.String name, int width, int height)
name - The name for image to be loaded from p2j.jar.width - The required image width.height - The required image height.public static ImageWrapper getScalableImage(java.lang.String name, java.lang.String location, int width, int height)
name - The name for image to be loaded from p2j.jar.location - The theme specific location for image to be loaded.width - The required image width.height - The required image height.public static ImageWrapper getScalableImage(java.lang.String name, java.lang.String location, int width, int height, boolean antialias)
name - The name for image to be loaded from p2j.jar.location - The theme specific location for image to be loaded.width - The required image width.height - The required image height.antialias - Set false to skip antialias processing the output
image, true otherwise.public static ImageWrapper getScalableImage(java.io.InputStream is, int width, int height, boolean antialias)
is - The given SVG input streamwidth - The required image width.height - The required image height.antialias - Set false to skip antialias processing the output image, true otherwise.null if the image
can't be created (e.g. if the bytes are not a valid image type).