|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParallaxedSprite
ParallaxedSprites are used for parallax effect (2.5D perspective). It cuts a sprite surface into an array of lines. They are scaled using a trapeze representation, for the perspective effect.
Method Summary | |
---|---|
int |
getHeightOriginal()
Get the current sprite height (its current size, after scaling operation). |
java.awt.image.BufferedImage |
getLine(int line)
Get a parallax line (first index is 0). |
int |
getWidthOriginal()
Get the current sprite width (its current size, after scaling operation). |
void |
prepare(Filter filter)
Update all changes. |
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. |
Methods inherited from interface com.b3dgs.lionengine.drawable.Renderable |
---|
getHeight, getWidth, render |
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |