public interface SpriteParallaxed
/======\ /========\ /==========\
Usage should be as following:
Drawable.loadSpriteParallaxed(com.b3dgs.lionengine.Media, int, int, int)
stretch(int, int)
load(boolean)
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Get the element height.
|
int |
getLineWidth(int line)
Get a parallax line width.
|
int |
getWidth()
Get the element width.
|
void |
load(boolean alpha)
Load surface and prepare it to be displayed.
|
void |
render(Graphic g,
int line,
int x,
int y)
Render a line of parallax to the specified coordinates.
|
void |
stretch(int percentWidth,
int percentHeight)
Works as scale, but using different width and height factor.
|
void load(boolean alpha)
alpha
- Set true
to enable alpha, false
else.LionEngineException
- If an error occurred when reading the image.void stretch(int percentWidth, int percentHeight)
percentWidth
- The percent value for scaling width (strictly positive).percentHeight
- The percent value for scaling height (strictly positive).void render(Graphic g, int line, int x, int y)
g
- The graphic output.line
- The line to render (positive).x
- The abscissa.y
- The ordinate.int getLineWidth(int line)
line
- The desired line (positive).int getWidth()
int getHeight()
Copyright © 2016 Byron 3D Games Studio. All rights reserved.