public interface SpriteParallaxed extends Renderable
/======\ /========\ /==========\
Usage should be as following:
Drawable.loadSpriteParallaxed(Media, int, int, int)
scale(int)
or stretch(int, int)
prepare(Filter)
Modifier and Type | Method and Description |
---|---|
int |
getHeightOriginal()
Get the current sprite height (its current size, after scaling operation).
|
ImageBuffer |
getLine(int line)
Get a parallax line (store it on a new buffered image, no reference, can be slow).
|
int |
getWidthOriginal()
Get the current sprite width (its current size, after scaling operation).
|
void |
prepare(Filter filter)
Update all changes.
|
void |
render(Graphic 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 different width and height factor.
|
getHeight, getWidth, render
void scale(int percent)
percent
- value for scaling (> 0).void stretch(int percentWidth, int percentHeight)
percentWidth
- The percent value for scaling width (> 0).percentHeight
- The percent value for scaling height (> 0).void prepare(Filter filter)
filter
- The filter to use.void render(Graphic g, int line, int x, int y)
g
- The graphic output.line
- The line to render (>= 0).x
- The abscissa.y
- The ordinate.int getWidthOriginal()
int getHeightOriginal()
ImageBuffer getLine(int line)
line
- The desired line (>= 0).