public class ImageDeformation extends AbstractTransform
An image deformation instance holds a global state for all drawings. Several instances can be created at the same
time. However a default instance is created on MicroUI framework startup and is always available.
| Modifier and Type | Field and Description |
|---|---|
static ImageDeformation |
Singleton
Default instance created on MicroUI framework startup.
|
| Constructor and Description |
|---|
ImageDeformation() |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(GraphicsContext gc,
Image image,
int[] xys,
int x,
int y,
int anchor)
Draws a deformed image at the given anchor point.
The image anchor point is at position @{code (x,y)}. |
getAlpha, getTranslateX, getTranslateY, isMirrored, resetAlpha, resetTranslate, setAlpha, setMirror, translatepublic static ImageDeformation Singleton
public void draw(GraphicsContext gc, Image image, int[] xys, int x, int y, int anchor)
gc - the GraphicsContext where to render the drawing.image - the Image to drawx - the x coordinate of the anchor pointy - the y coordinate of the anchor pointxys - the array of coordinates : x1,y1,x2,y2,x3,y3,x4,y4.anchor - position of the image around the anchor pointjava.lang.NullPointerException - if @{code image}, @{code gc} or @{code xys} array is @{code null}java.lang.IllegalArgumentException - if the @{code xys} length is different than 2*4.