I
- The source image type.public class EmbeddedImageStructure<I>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static int |
CONVERT_3D_MASK
convert 3d image bit mask
|
private int |
height
Height parameter
|
private int |
imageConversionMask
The bits mask that encodes image conversions.
|
private ImageWrapper<I> |
img
Image to draw
|
(package private) static int |
RETAIN_SHAPE_MASK
retain shape image bit mask
|
(package private) static int |
STRETCH_TO_FIT_MASK
stretch to fit image bit mask
|
(package private) static int |
TRANSPARENT_MASK
transparent image bit mask
|
private int |
width
Width parameter
|
private int |
xOffset
X offset to start drawing image.
|
private int |
yOffset
Y offset to start drawing image.
|
Modifier | Constructor and Description |
---|---|
private |
EmbeddedImageStructure(PaintStructure<F,I> paintStructure)
Creates the embedded image structure filled with the required parameters taken from
the provided paint structure.
|
Modifier and Type | Method and Description |
---|---|
static <F,I> EmbeddedImageStructure<I> |
create(PaintStructure<F,I> ps)
Creates the embedded image structure filled with the required parameters to draw the target.
|
private static <F,I> byte |
encodeImageConversionMask(PaintStructure<F,I> paintStructure)
Encodes image conversions: 3d, transparent, stretch, retain.
|
int |
getHeight()
Returns the image canvas height.
|
ImageWrapper<I> |
getImage()
Returns the wrapped image.
|
int |
getImageConversionMask()
Encodes image conversions: 3d, transparent, stretch, retain.
|
java.util.List<java.lang.Integer> |
getObjectSeal()
Returns the embedded image identity 6-tuple.
|
int |
getWidth()
Returns the image canvas width.
|
I |
getWrappedImage()
Returns the target image to draw.
|
int |
getXOffset()
The image drawing offset along x-axis.
|
int |
getYOffset()
The image drawing offset along y-axis.
|
private boolean |
hasConversion(int conversion)
Helper method to get the conversion mask is supported or not.
|
boolean |
is3D()
Indicates the image should be 3D style.
|
boolean |
isRetainShape()
Indicates the image should retain shape.
|
boolean |
isStretchToFit()
Indicates the image should stretch to fit the embedded space.
|
boolean |
isTransparent()
Indicates the image should be transparent.
|
static final int CONVERT_3D_MASK
static final int TRANSPARENT_MASK
static final int STRETCH_TO_FIT_MASK
static final int RETAIN_SHAPE_MASK
private final int width
private final int height
private final int xOffset
private final int yOffset
private final ImageWrapper<I> img
private final int imageConversionMask
private EmbeddedImageStructure(PaintStructure<F,I> paintStructure)
paintStructure
- The paint structure parameterized by F and I types.public static <F,I> EmbeddedImageStructure<I> create(PaintStructure<F,I> ps)
ps
- The paint structure.private static <F,I> byte encodeImageConversionMask(PaintStructure<F,I> paintStructure)
paintStructure
- The paint structure parameterized by F and I types.public int getWidth()
public int getHeight()
public int getXOffset()
public int getYOffset()
public ImageWrapper<I> getImage()
public I getWrappedImage()
public int getImageConversionMask()
public java.util.List<java.lang.Integer> getObjectSeal()
public boolean isRetainShape()
public boolean is3D()
public boolean isStretchToFit()
public boolean isTransparent()
private boolean hasConversion(int conversion)
conversion
- The conversion mask that can be one of CONVERT_3D_MASK, RETAIN_SHAPE_MASK,
STRETCH_TO_FIT_MASK, TRANSPARENT_MASK.