playn.java
Class JavaStaticImage

java.lang.Object
  extended by playn.core.gl.ImageGL
      extended by playn.java.JavaStaticImage
All Implemented Interfaces:
Image

public class JavaStaticImage
extends ImageGL


Nested Class Summary
 
Nested classes/interfaces inherited from interface playn.core.Image
Image.BitmapTransformer, Image.Region
 
Field Summary
protected  playn.java.JavaGLContext ctx
           
protected  BufferedImage img
           
 
Fields inherited from class playn.core.gl.ImageGL
refs, reptex, scale, tex
 
Constructor Summary
JavaStaticImage(playn.java.JavaGLContext ctx, BufferedImage img, Scale scale)
           
 
Method Summary
 void addCallback(ResourceCallback<? 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()
           
 Image.Region subImage(float sx, float sy, float swidth, float sheight)
           
 Pattern toPattern()
           
 Image transform(Image.BitmapTransformer xform)
           
protected  void updateTexture(GLContext ctx, Object tex)
           
 float width()
           
 
Methods inherited from class playn.core.gl.ImageGL
clearTexture, ensureTexture, reference, release, texHeight, texWidth, x, y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

protected final playn.java.JavaGLContext ctx

img

protected BufferedImage img
Constructor Detail

JavaStaticImage

public JavaStaticImage(playn.java.JavaGLContext ctx,
                       BufferedImage img,
                       Scale scale)
Method Detail

addCallback

public void addCallback(ResourceCallback<? super Image> callback)

width

public float width()
Specified by:
width in interface Image

height

public float height()
Specified by:
height in interface Image

isReady

public boolean isReady()
Specified by:
isReady in interface Image

subImage

public Image.Region subImage(float sx,
                             float sy,
                             float swidth,
                             float sheight)
Specified by:
subImage in interface Image

toPattern

public Pattern toPattern()
Specified by:
toPattern in interface Image

getRgb

public void getRgb(int startX,
                   int startY,
                   int width,
                   int height,
                   int[] rgbArray,
                   int offset,
                   int scanSize)
Specified by:
getRgb in interface Image

transform

public Image transform(Image.BitmapTransformer xform)
Specified by:
transform in interface Image

draw

public void draw(Graphics2D gfx,
                 float x,
                 float y,
                 float w,
                 float h)

draw

public void draw(Graphics2D gfx,
                 float dx,
                 float dy,
                 float dw,
                 float dh,
                 float sx,
                 float sy,
                 float sw,
                 float sh)

updateTexture

protected void updateTexture(GLContext ctx,
                             Object tex)
Specified by:
updateTexture in class ImageGL


Copyright © 2012. All Rights Reserved.