jjil.core
Class Gray32SubImage

java.lang.Object
  extended by jjil.core.Image
      extended by jjil.core.Gray32Image
          extended by jjil.core.Gray32SubImage

public class Gray32SubImage
extends Gray32Image

Gray32SubImage is used to represent a rectangular region extracted from a larger Gray32Image, retaining the x and y position where the image was extracted.

Author:
webb

Constructor Summary
Gray32SubImage(int cWidth, int cHeight, int cX, int cY)
          Creates a new instance of Gray32SubImage
 
Method Summary
 Image clone()
          Copy this image
 int getXOffset()
          Return horizontal position of top-left corner of subimage.
 int getYOffset()
          Return vertical position of top-left corner of subimage.
 void setXOffset(int nX)
          Change horizontal position of subimage.
 void setYOffset(int nY)
          Change vertical psotion of subimage.
 java.lang.String toString()
          Return a string describing the image.
 
Methods inherited from class jjil.core.Gray32Image
getData
 
Methods inherited from class jjil.core.Image
getHeight, getWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gray32SubImage

public Gray32SubImage(int cWidth,
                      int cHeight,
                      int cX,
                      int cY)
Creates a new instance of Gray32SubImage

Parameters:
cWidth - Image width.
cHeight - Image height.
cX - Horizontal position of top-left corner of subimage.
cY - Vertical position of top-left corner of subimage.
Method Detail

clone

public Image clone()
Copy this image

Overrides:
clone in class Gray32Image
Returns:
the image copy.

getXOffset

public int getXOffset()
Return horizontal position of top-left corner of subimage.

Returns:
the horizontal position of the top-left corner of the subimage.

getYOffset

public int getYOffset()
Return vertical position of top-left corner of subimage.

Returns:
vertical position of top-left corner of subimage.

setXOffset

public void setXOffset(int nX)
Change horizontal position of subimage.

Parameters:
nX - New horizontal position of top-left corner of subimage.

setYOffset

public void setYOffset(int nY)
Change vertical psotion of subimage.

Parameters:
nY - New vertical position of top-left corner of subimage.

toString

public java.lang.String toString()
Return a string describing the image.

Overrides:
toString in class Gray32Image
Returns:
the string.