public class AniImage extends AnimatedDrawing
Modifier and Type | Field and Description |
---|---|
Rect |
limits
Gets the bounds of the hot area.
|
Point |
relativeToOrigin |
AlwaysOnTop, CompletelyIn, freeImageWithDrawing, HasBorder, HasChanged, HasMoved, hotArea, hotPolygon, image, InUse, IsAnimated, IsEmpty, IsInvisible, IsLocked, IsMoveable, IsNotHot, IsNotStill, IsPrepared, IsPreparing, KeepOnScreen, lastDrawn, location, MouseMustBeOver, properties, RelativeToOrigin
background, height, width
CREATE_OPTION_DONT_SCALE_UP, CREATE_OPTION_IGNORE_ALPHA, CREATE_OPTION_KEEP_ASPECT_RATIO, CREATE_OPTION_ROUGH_SCALING, SCAN_LINE_BYTE_ARRAY, SCAN_LINE_INT_ARRAY, TYPE_ARGB, TYPE_GRAY_SCALE_16, TYPE_GRAY_SCALE_2, TYPE_GRAY_SCALE_256, TYPE_GRAY_SCALE_4, TYPE_INDEXED_16, TYPE_INDEXED_2, TYPE_INDEXED_256, TYPE_INDEXED_4, TYPE_MASK, TYPE_MONO, TYPE_RGB, TYPE_UNKNOWN
Constructor and Description |
---|
AniImage() |
AniImage(ImageData image) |
AniImage(ImageData image,
Object maskObject) |
AniImage(String imageName) |
AniImage(String imageName,
Object maskObject) |
Modifier and Type | Method and Description |
---|---|
ImageMover |
animateMoveTo(int destinationX,
int destinationY,
int timeToMoveInMillis)
Move this AniImage to a new location, moving it on screen within a certain time period.
|
boolean |
canGo(Point where) |
void |
change(IImage newImage)
Changes the image.
|
void |
changeBounds(int x,
int y,
int width,
int height)
Change any aspect of the bounds of the image.
|
void |
changed()
Marks the image as having been changed in some way.
|
Mosaic |
getMosaic() |
Rect |
getMovedBounds() |
Object |
getNew() |
boolean |
isCompletelyWithin(AniImage other)
Returns if this AniImage is completely within the other AniImage.
|
boolean |
isDraggedOver(AniImage draggingOver,
Point mouseLocation) |
boolean |
isIn(Point p) |
boolean |
isTouching(AniImage other)
Returns if this AniImage is touching the other AniImage.
|
boolean |
isWithin(AniImage other)
Returns if this AniImage is "within" the other AniImage - where "within"
is "touching" if CompletelyIn property is not set, otherwise it is "isCompletelyWithin".
|
void |
move(int x,
int y)
Moves the image.
|
void |
resize(int width,
int height)
Resize the image.
|
void |
setLocation(int x,
int y)
This resets the location of the image.
|
void |
translate(int dx,
int dy)
Translates the image.
|
void |
updated()
Marks the image as not having been changed.
|
changeRefresher, getRefresher, newRefresher, refresh, refresh, setRefresher, startAnimate, stopAnimate
compareTo, copyFrom, doDraw, draw, draw, drawBorder, drawn, free, getBackground, getCopy, getDim, getHotArea, getImage, getImageScanLines, getLocation, getPixels, getSize, getUnusedColor, isWriteableImage, onHotArea, setHotAreaInImage, setImage, setImageScanLines, setPixels, setRect, setSize, usesAlpha
createImageFor, draw, draw, freeImage, getCompatibleImagePoints, getDPI, getHeight, getImageColorTable, getImageData, getImageHeight, getImageScanLineLength, getImageScanLineType, getImageType, getImageWidth, getNativeDrawable, getPixelsUsingScanLines, getScanLinesUsingPixels, getWidth, isReadableImage, scanLinesComplete, setPixelsUsingScanLines, setScanLinePixels, setScanLinesUsingPixels
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackground, usesAlpha
freeImage, getImageColorTable, getImageHeight, getImageScanLineLength, getImageScanLines, getImageScanLineType, getImageType, getImageWidth, getPixels, isReadableImage, isWriteableImage, setImageScanLines, setPixels
public Rect limits
public Point relativeToOrigin
public AniImage()
public AniImage(String imageName)
imageName
- maskImageName
- public AniImage(ImageData image)
public AniImage(String imageName, Object maskObject)
imageName
- maskImageName
- public boolean canGo(Point where)
public boolean isTouching(AniImage other)
public final boolean isCompletelyWithin(AniImage other)
public final boolean isWithin(AniImage other)
public final boolean isIn(Point p)
public void changed()
public void updated()
public void move(int x, int y)
public void change(IImage newImage)
public void resize(int width, int height)
public void changeBounds(int x, int y, int width, int height)
x
- y
- width
- height
- public void translate(int dx, int dy)
public void setLocation(int x, int y)
setLocation
in class Drawing
public Rect getMovedBounds()
public Mosaic getMosaic()
public ImageMover animateMoveTo(int destinationX, int destinationY, int timeToMoveInMillis)
destinationX
- The destination X position.destinationY
- The destination Y position.timeToMoveInMillis
- How long to take to move it in milliseconds.