public class ImageSprite extends Sprite
canvas, heading, headingCos, headingRadians, headingSin, initialized, interval, speed, userHeading, visible, xLeft, yTop, zLayerACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF| Constructor and Description |
|---|
ImageSprite(ComponentContainer container)
Constructor for ImageSprite.
|
| Modifier and Type | Method and Description |
|---|---|
int |
Height()
Height property getter method.
|
void |
Height(int height)
Height property setter method.
|
void |
onDraw(android.graphics.Canvas canvas)
Draws the sprite on the given canvas
|
java.lang.String |
Picture()
Returns the path of the sprite's picture
|
void |
Picture(java.lang.String path)
Specifies the path of the sprite's picture
See
MediaUtil.determineMediaSource(com.google.appinventor.components.runtime.Form, java.lang.String) for information about what
a path can be. |
boolean |
Rotates()
Rotates property getter method.
|
void |
Rotates(boolean rotates)
Rotates property setter method
|
int |
Width()
Width property getter method.
|
void |
Width(int width)
Width property setter method.
|
alarm, Bounce, CollidedWith, colliding, CollidingWith, containsPoint, Dragged, EdgeReached, Enabled, Enabled, Flung, getBoundingBox, getDispatchDelegate, Heading, Heading, hitEdge, hitEdge, Initialize, intersectsWith, Interval, Interval, MoveIntoBounds, moveIntoBounds, MoveTo, NoLongerCollidingWith, onDelete, onDestroy, PointInDirection, PointTowards, postEvent, registerChange, Speed, Speed, TouchDown, Touched, TouchUp, updateCoordinates, Visible, Visible, X, X, Y, Y, Z, Zpublic ImageSprite(ComponentContainer container)
container - public void onDraw(android.graphics.Canvas canvas)
Spritepublic java.lang.String Picture()
public void Picture(java.lang.String path)
MediaUtil.determineMediaSource(com.google.appinventor.components.runtime.Form, java.lang.String) for information about what
a path can be.path - the path of the sprite's picturepublic int Height()
VisibleComponentHeight in class VisibleComponentpublic void Height(int height)
VisibleComponentHeight in class VisibleComponentheight - height property used by the layoutpublic int Width()
VisibleComponentWidth in class VisibleComponentpublic void Width(int width)
VisibleComponentWidth in class VisibleComponentwidth - width property used by the layoutpublic boolean Rotates()
true indicates that the image rotates to match the sprite's heading
false indicates that the sprite image doesn't rotate.public void Rotates(boolean rotates)
rotates - true indicates that the image rotates to match the sprite's heading
false indicates that the sprite image doesn't rotate.