playn.java
Class JavaAsyncImage
java.lang.Object
playn.core.gl.AbstractImageGL<GC>
playn.core.gl.ImageGL<Graphics2D>
playn.java.JavaAsyncImage
- All Implemented Interfaces:
- AsyncImage<BufferedImage>, Image
public class JavaAsyncImage
- extends ImageGL<Graphics2D>
- implements AsyncImage<BufferedImage>
|
Method Summary |
void |
addCallback(Callback<? super Image> callback)
|
void |
draw(Graphics2D gfx,
float x,
float y,
float w,
float h)
|
void |
draw(Graphics2D gfx,
float dx,
float dy,
float dw,
float dh,
float sx,
float sy,
float sw,
float sh)
|
void |
getRgb(int startX,
int startY,
int width,
int height,
int[] rgbArray,
int offset,
int scanSize)
|
float |
height()
|
boolean |
isReady()
|
void |
setError(Throwable error)
|
void |
setImage(BufferedImage img,
Scale scale)
|
Pattern |
toPattern()
|
protected Pattern |
toSubPattern(AbstractImageGL<?> image,
boolean repeatX,
boolean repeatY,
float x,
float y,
float width,
float height)
|
Image |
transform(Image.BitmapTransformer xform)
|
protected void |
updateTexture(int tex)
|
float |
width()
|
| Methods inherited from interface playn.core.Image |
clearTexture, ensureTexture, getRgb, isReady, repeatX, repeatY, scale, setMipmapped, setRepeat, subImage, toPattern, transform |
img
protected BufferedImage img
JavaAsyncImage
public JavaAsyncImage(GLContext ctx,
float preWidth,
float preHeight)
width
public float width()
- Specified by:
width in interface Image
height
public float height()
- Specified by:
height in interface Image
addCallback
public void addCallback(Callback<? super Image> callback)
- Specified by:
addCallback in interface Image
setImage
public void setImage(BufferedImage img,
Scale scale)
- Specified by:
setImage in interface AsyncImage<BufferedImage>
setError
public void setError(Throwable error)
- Specified by:
setError in interface AsyncImage<BufferedImage>
isReady
public boolean isReady()
toPattern
public Pattern toPattern()
- Specified by:
toPattern in interface Image- Overrides:
toPattern in class AbstractImageGL<Graphics2D>
getRgb
public void getRgb(int startX,
int startY,
int width,
int height,
int[] rgbArray,
int offset,
int scanSize)
- Specified by:
getRgb in interface Image- Overrides:
getRgb in class AbstractImageGL<Graphics2D>
transform
public Image transform(Image.BitmapTransformer xform)
- Specified by:
transform in interface Image- Overrides:
transform in class AbstractImageGL<Graphics2D>
draw
public void draw(Graphics2D gfx,
float x,
float y,
float w,
float h)
- Specified by:
draw in class AbstractImageGL<Graphics2D>
draw
public void draw(Graphics2D gfx,
float dx,
float dy,
float dw,
float dh,
float sx,
float sy,
float sw,
float sh)
- Specified by:
draw in class AbstractImageGL<Graphics2D>
toSubPattern
protected Pattern toSubPattern(AbstractImageGL<?> image,
boolean repeatX,
boolean repeatY,
float x,
float y,
float width,
float height)
- Specified by:
toSubPattern in class AbstractImageGL<Graphics2D>
updateTexture
protected void updateTexture(int tex)
- Specified by:
updateTexture in class ImageGL<Graphics2D>
Copyright © 2013. All Rights Reserved.