Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

CanvasJavaImage Class Reference

Extension of CanvasImage to display a "Java" Image on a Canvas. More...

Inheritance diagram for CanvasJavaImage::

CanvasImage CanvasObject List of all members.

Public Methods

 CanvasJavaImage ()
 Construct an empty image. More...

 CanvasJavaImage (int width, int height)
 Construct an empty image. More...

 CanvasJavaImage (Image im)
 Construct from a Java Image. More...

 CanvasJavaImage (BufferedImage im)
 Construct from a buffered Java Image. More...

 CanvasJavaImage (int[] pixels, double w, double h)
 Construct from a set of RGB pixels. More...

 CanvasJavaImage (String filename, Component comp)
 Construct from a file. More...

void draw (Graphics g)
 Draw CanvasObject on 'g', using internal CCS values. More...

Color getPixel (int x, int y)
void setPixel (int x, int y, Color c)
int[] getPixels (int x, int y, int w, int h)
BufferedImage getSubImage (int x, int y, int w, int h)
String[] getPixelStrings (int x, int y, int w, int h)

Protected Methods

void initImage (Image im)
void initImage (int width, int height)
void initImage (int[] pixels, int width, int height)

Detailed Description

Extension of CanvasImage to display a "Java" Image on a Canvas.

The sizes of the java image determine the sizes (in ICS) of the CanvasHxImage. The draw method of this class actually draws _bufIm at the CCS coordinates. So, Graphics.drawImage does the actual zooming of the pixel data.


Constructor & Destructor Documentation

CanvasJavaImage::CanvasJavaImage   [inline]
 

Construct an empty image.

CanvasJavaImage::CanvasJavaImage int    width,
int    height
[inline]
 

Construct an empty image.

CanvasJavaImage::CanvasJavaImage Image    im [inline]
 

Construct from a Java Image.

CanvasJavaImage::CanvasJavaImage BufferedImage    im [inline]
 

Construct from a buffered Java Image.

CanvasJavaImage::CanvasJavaImage int    pixels[],
double    w,
double    h
[inline]
 

Construct from a set of RGB pixels.

CanvasJavaImage::CanvasJavaImage String    filename,
Component    comp
[inline]
 

Construct from a file.

comp is used to get at the ToolKit.


Member Function Documentation

void CanvasJavaImage::draw Graphics    g [inline, virtual]
 

Draw CanvasObject on 'g', using internal CCS values.

Reimplemented from CanvasObject.

Color CanvasJavaImage::getPixel int    x,
int    y
[inline]
 

void CanvasJavaImage::setPixel int    x,
int    y,
Color    c
[inline, virtual]
 

Reimplemented from CanvasImage.

int [] CanvasJavaImage::getPixels int    x,
int    y,
int    w,
int    h
[inline]
 

BufferedImage CanvasJavaImage::getSubImage int    x,
int    y,
int    w,
int    h
[inline, virtual]
 

Reimplemented from CanvasImage.

String [] CanvasJavaImage::getPixelStrings int    x,
int    y,
int    w,
int    h
[inline, virtual]
 

Reimplemented from CanvasImage.

void CanvasJavaImage::initImage Image    im [inline, protected]
 

void CanvasJavaImage::initImage int    width,
int    height
[inline, protected]
 

void CanvasJavaImage::initImage int    pixels[],
int    width,
int    height
[inline, protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Jan 8 14:14:23 2002 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001