pulpcore.sprite
Class FilledSprite
java.lang.Object
pulpcore.sprite.Sprite
pulpcore.sprite.FilledSprite
- All Implemented Interfaces:
- PropertyListener
public class FilledSprite
- extends Sprite
Solid-colored rectangluar shaped sprite.
| Fields inherited from class pulpcore.sprite.Sprite |
alpha, angle, CENTER, DEFAULT, EAST, enabled, height, NORTH, NORTH_EAST, NORTH_WEST, pixelSnapping, SOUTH, SOUTH_EAST, SOUTH_WEST, visible, WEST, width, x, y |
| Methods inherited from class pulpcore.sprite.Sprite |
bindLocationTo, bindSizeTo, clearCursor, clearDirtyRect, contains, draw, getAnchor, getBlendMode, getCursor, getDirtyRect, getLocalX, getLocalY, getNaturalHeight, getNaturalWidth, getParent, getPixelLevelChecks, getRoot, getScene2D, getViewX, getViewX, getViewY, getViewY, intersects, isDirty, isEnabled, isEnabledAndVisible, isMouseDoubleClicked, isMouseDown, isMouseHover, isMouseOver, isMousePressed, isMouseReleased, isMouseTripleClicked, isMouseWheelRotated, isPick, isPickEnabledAndVisible, isTransparent, move, move, move, move, move, move, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, propertyChange, scale, scale, scale, scale, scale, scale, scaleTo, scaleTo, scaleTo, scaleTo, scaleTo, scaleTo, setAnchor, setBlendMode, setCursor, setDirty, setLocation, setLocation, setSize, setSize, translate, translate, updateDirtyRect |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fillColor
public final Color fillColor
- Fill color
borderColor
public final Color borderColor
- Border color
FilledSprite
public FilledSprite(int fillColor)
FilledSprite
public FilledSprite(int x,
int y,
int w,
int h,
int fillColor)
- Parameters:
fillColor - Color of the FilledSprite in the ARGB format.
FilledSprite
public FilledSprite(double x,
double y,
double w,
double h,
int fillColor)
setBorderSize
public final void setBorderSize(int borderSize)
setBorderSize
public void setBorderSize(int top,
int left,
int bottom,
int right)
update
public void update(int elapsedTime)
- Description copied from class:
Sprite
- Updates all of this Sprite's properties. Subclasses that override this method should
call super.update().
- Overrides:
update in class Sprite
getAnchorX
protected int getAnchorX()
- Overrides:
getAnchorX in class Sprite
- Returns:
- the fixed-point x anchor.
getAnchorY
protected int getAnchorY()
- Overrides:
getAnchorY in class Sprite
- Returns:
- the fixed-point y anchor.
drawSprite
protected void drawSprite(CoreGraphics g)
- Description copied from class:
Sprite
- Draws the sprite. The graphic context's alpha is set to this sprite,
and it's translation is offset by this sprite's location.
This method is not called if the sprite is not visible or it's alpha
is less than or equal to zero.
- Specified by:
drawSprite in class Sprite
Copyright © 2007-2008 Interactive Pulp, LLC.