All Packages Class Hierarchy This Package Previous Next Index
public class netscape.application.Bitmap
extends netscape.application.Image
{
/* Constructors
*/
public Bitmap();
public Bitmap(int, int);
public Bitmap(int[], int, int);
public Bitmap(int[], int, int, int, int);
/* Methods
*/
public static Bitmap bitmapFromURL(URL);
public static synchronized Bitmap bitmapNamed(String, boolean, boolean); *Beta API*
public static Bitmap bitmapNamed(String, boolean);
public static Bitmap bitmapNamed(String);
public Graphics createGraphics();
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public void drawAt(Graphics, int, int);
public void drawScaled(Graphics, int, int, int, int);
public void encode(Encoder);
public void flush();
public boolean grabPixels(int[]);
public boolean grabPixels(int[], int, int, int, int, int, int);
public boolean hasLoadedData();
public int height();
public boolean isTransparent();
public boolean isValid();
public void loadData();
public boolean loadsIncrementally();
public String name();
public void setLoadsIncrementally(boolean);
public void setTransparent(boolean);
public synchronized void setUpdateCommand(String);
public synchronized void setUpdateTarget(Target);
public String toString();
public synchronized String updateCommand();
public synchronized Rect updateRect();
public synchronized Target updateTarget();
public int width();
}
Image subclass that draws bitmapped data. Typically, you retrieve a
Bitmap by name from a GIF file:
bitmap = Bitmap.bitmapNamed("ColorBackground.gif");
You can also use a Bitmap for offscreen drawing. You can construct a
Graphics object to draw into a Bitmap using the code:
bitmap = new Bitmap(width, height);
g = new Graphics(bitmap);
public Bitmap()
public Bitmap(int width,
int height)
public Bitmap(int pixels[],
int width,
int height)
Bitmap(pixels, width, height, 0, width)
public Bitmap(int pixels[],
int width,
int height,
int offset,
int scanSize)
The format follows the default Java color model, where each pixel is a 32-bit integer. Bits 24-31 are the alpha transparency, bits 16-23 are the red value, bits 8-15 are the green value, and bits 0-7 are the blue value.
public static synchronized Bitmap bitmapNamed(String bitmapName,
boolean startLoading,
boolean cache) *Beta API*
"codebase"/images/bitmapName
and attempts to load this image. bitmapName can specify a
file name or path, such as "newImages/ColorBackground.gif".
This method starts loading the bitmap's data if startLoading is
true. Otherwise, the IFC retrieves the data when needed.
If cache is true the bitmap will be added to an Application
cache for faster future lookups. Images placed in the cache are not
released for the lifetime of the Application object. If cache
is false, the image will not be placed in the application cache, and
it will be released in the normal manner.
public static Bitmap bitmapNamed(String bitmapName,
boolean startLoading)
"codebase"/images/bitmapName
and attempts to load this image. bitmapName can specify a
file name or path, such as "newImages/ColorBackground.gif".
This method starts loading the bitmap's data if startLoading is
true. Otherwise, the IFC retrieves the data when needed.
This call is equivelent to:
Bitmap.bitmapNamed(bitmapName, startLoading, true);
public static Bitmap bitmapNamed(String bitmapName)
Bitmap.bitmapNamed(bitmapName, true, true);
public static Bitmap bitmapFromURL(java.net.URL url)
public Graphics createGraphics()
public boolean grabPixels(int pixels[])
grabPixels(pixels, 0, 0, width(), height(), 0, width());
Returns true on success, false on failure.
public boolean grabPixels(int pixels[],
int x,
int y,
int width,
int height,
int offset,
int scanSize)
Returns true on success, false on failure.
public String name()
public int width()
public int height()
public void setTransparent(boolean transparent)
public boolean isTransparent()
public void drawAt(Graphics g,
int x,
int y)
public void drawScaled(Graphics g,
int x,
int y,
int width,
int height)
public void loadData()
public boolean hasLoadedData()
public void setLoadsIncrementally(boolean flag)
public boolean loadsIncrementally()
public synchronized Rect updateRect()
public synchronized void setUpdateTarget(Target aTarget)
public synchronized Target updateTarget()
public synchronized void setUpdateCommand(String command)
public synchronized String updateCommand()
public boolean isValid()
public void flush()
public String toString()
public void describeClassInfo(ClassInfo info)
public void encode(Encoder encoder) throws CodingException
public void decode(Decoder decoder) throws CodingException
All Packages Class Hierarchy This Package Previous Next Index