org.xwt
Class Picture

java.lang.Object
  extended byorg.xwt.Picture
Direct Known Subclasses:
AWT.AWTPicture, Win32.Win32Picture, X11.X11Picture

public abstract class Picture
extends java.lang.Object

The in-memory representation of a PNG or GIF image. It is read-only. It is usually passed to PixelBuffer.drawPicture()

Implementations of the Platform class should return objects supporting this interface from the createPicture() method. These implementations may choose to implement caching strategies (for example, using a Pixmap on X11).


Field Summary
 Res res
          the resource that created this Picture
 
Constructor Summary
Picture()
           
 
Method Summary
static Picture fromRes(Res r, Callback callback)
          turns a resource into a Picture.Source and passes it to the callback
abstract  int getHeight()
          the height of the picture
abstract  int getWidth()
          the width of the picture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

res

public Res res
the resource that created this Picture

Constructor Detail

Picture

public Picture()
Method Detail

getHeight

public abstract int getHeight()
the height of the picture


getWidth

public abstract int getWidth()
the width of the picture


fromRes

public static Picture fromRes(Res r,
                              Callback callback)
turns a resource into a Picture.Source and passes it to the callback