playn.java
Class JavaStaticImage

java.lang.Object
  extended by playn.core.gl.AbstractImageGL<GC>
      extended by playn.core.gl.ImageGL<Graphics2D>
          extended by playn.java.JavaStaticImage
All Implemented Interfaces:
Image

public class JavaStaticImage
extends ImageGL<Graphics2D>


Nested Class Summary
 
Nested classes/interfaces inherited from interface playn.core.Image
Image.BitmapTransformer, Image.Region
 
Field Summary
protected  BufferedImage img
           
 
Fields inherited from class playn.core.gl.ImageGL
scale, tex
 
Fields inherited from class playn.core.gl.AbstractImageGL
ctx, mipmapped, refs, repeatX, repeatY
 
Constructor Summary
JavaStaticImage(GLContext ctx, BufferedImage img, Scale scale)
           
 
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()
           
 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 class playn.core.gl.ImageGL
clearTexture, convertToRepTex, createMainTex, createPow2RepTex, ensureTexture, finalize, scale
 
Methods inherited from class playn.core.gl.AbstractImageGL
reference, release, repeatX, repeatY, setMipmapped, setRepeat, subImage
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

img

protected BufferedImage img
Constructor Detail

JavaStaticImage

public JavaStaticImage(GLContext ctx,
                       BufferedImage img,
                       Scale scale)
Method Detail

addCallback

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

width

public float width()

height

public float height()

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.