public class ImageHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MIME_GIF |
static String |
MIME_JPEG |
static String |
MIME_JPG |
static String |
MIME_PNG |
Constructor and Description |
---|
ImageHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
bitmapFillModeIsRepeat(BitmapFillNode node)
Determines whether the bitmap fill mode is repeat.
|
static boolean |
bitmapImageNeedsClipping(DefineImage defImage,
BitmapGraphicNode node)
Determines whether the bitmap image should be clipped.
|
static DefineShapeTag |
create9SlicedShape(DefineImage bitmap,
Rect r,
double width,
double height) |
static DefineImage |
createDefineBits(InputStream in,
String mimeType) |
static DefineImage |
createDefineBitsLossless(int[] pixels,
int width,
int height) |
static DefineShapeTag |
createShapeForImage(DefineImage image,
BitmapGraphicNode node)
Creates a rectangle for the given width and height as a DefineShape.
|
static String |
guessMimeType(String path) |
static boolean |
isBitmapFillWithClip(IFillNode fill) |
public static final String MIME_GIF
public static final String MIME_JPEG
public static final String MIME_JPG
public static final String MIME_PNG
public static DefineShapeTag createShapeForImage(DefineImage image, BitmapGraphicNode node)
image
- The DefineBits tag encoding the image.node
- The BitmapGraphicNode.public static boolean bitmapImageNeedsClipping(DefineImage defImage, BitmapGraphicNode node)
defImage
- The tag encoding the image.node
- The BitmapGraphicNode.public static boolean bitmapFillModeIsRepeat(BitmapFillNode node)
node
- The BitmapFillNode.public static boolean isBitmapFillWithClip(IFillNode fill)
public static DefineImage createDefineBits(InputStream in, String mimeType) throws IOException
IOException
public static DefineImage createDefineBitsLossless(int[] pixels, int width, int height) throws IOException
IOException
public static DefineShapeTag create9SlicedShape(DefineImage bitmap, Rect r, double width, double height)
Copyright © 2016 The Apache Software Foundation. All rights reserved.