superwaba.ext.xplat.fx.png
Class PngImage

java.lang.Object
  |
  +--waba.fx.Image
        |
        +--superwaba.ext.xplat.fx.png.PngImage

public class PngImage
extends Image

A PngImage is simply a waba.io.Image, except for its specific constructor.


Fields inherited from class waba.fx.Image
height, palRGBs, pixels, savingPal, transparentColor, transparentPixel, width
 
Constructor Summary
PngImage()
          Default Constructor You can call this constructor and then call load(Stream), although the use of the other constructors is better.
PngImage(Stream pngStream)
          Constructor Creates the image reading the given waba.io.Stream
PngImage(java.lang.String fileName)
          Constructor Creates the image reading the given file which belongs to the application pdb or an attached library.
 
Method Summary
 void copyFrom(Image img)
          Internal use only
 void load(Stream pngStream)
          Implements the method to let us load the image found in the given waba.io.Stream.  Must be called only once per image.
 
Methods inherited from class waba.fx.Image
applyPalette, changeColors, createBmp, free, getGraphics, getHeight, getPalette, getPixelRow, getRotatedScaledInstance, getScaledInstance, getTouchedUpInstance, getTransparentColor, getWidth, saveTo, scaledBy, setPalette, setTransparentColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PngImage

public PngImage()
Default Constructor You can call this constructor and then call load(Stream), although the use of the other constructors is better.

PngImage

public PngImage(java.lang.String fileName)
         throws ImageError
Constructor Creates the image reading the given file which belongs to the application pdb or an attached library.
Parameters:
fileName - name of the image file
Throws:
ImageError - Starting in SuperWaba version 5.8, when there's a problem with the image load and if Settings.useExceptions is true, an ImageError is thrown.

PngImage

public PngImage(Stream pngStream)
         throws ImageError
Constructor Creates the image reading the given waba.io.Stream
Parameters:
pngStream - waba.io.Stream that contains the JPEG image
Method Detail

load

public void load(Stream pngStream)
          throws ImageError
Implements the method to let us load the image found in the given waba.io.Stream.  Must be called only once per image.
Overrides:
load in class Image
Parameters:
pngStream - waba.io.Stream that contains the JPEG image
Throws:
ImageError - Starting in SuperWaba version 5.8, when there's a problem with the image load and if Settings.useExceptions is true, an ImageError is thrown.

copyFrom

public void copyFrom(Image img)
Internal use only