public interface ParallaxedSprite extends Renderable
Modifier and Type | Method and Description |
---|---|
int |
getHeightOriginal()
Get the current sprite height (its current size, after scaling operation).
|
java.awt.image.BufferedImage |
getLine(int line)
Get a line a parallax.
|
int |
getWidthOriginal()
Get the current sprite width (its current size, after scaling operation).
|
void |
prepare(Filter filter)
Update all changes; need to be called when changes are done.
|
void |
render(java.awt.Graphics2D g,
int line,
int x,
int y)
Render a line of parallax to the specified coordinates.
|
void |
scale(int percent)
Method used for sprite scaling, in order to modify its size.
|
void |
stretch(int percentWidth,
int percentHeight)
Works as scale, but using differents width and height factor.
|
getHeight, getWidth, render
void scale(int percent)
percent
- value for scaling.void stretch(int percentWidth, int percentHeight)
percentWidth
- percent value for scaling width.percentHeight
- percent value for scaling height.void prepare(Filter filter)
filter
- filter to use.void render(java.awt.Graphics2D g, int line, int x, int y)
g
- graphic output.line
- line to render.x
- abscissa.y
- ordinate.int getWidthOriginal()
int getHeightOriginal()
java.awt.image.BufferedImage getLine(int line)
line
- desired line.