jjil.core
Class Gray8SubImage

java.lang.Object
  extended by jjil.core.Image
      extended by jjil.core.Gray8Image
          extended by jjil.core.Gray8SubImage

public class Gray8SubImage
extends Gray8Image

Gray8SubImage is used to represent a rectangular region extracted from a larger Gray8Image, retaining the x and y position where the subimage was extracted.

Author:
webb

Constructor Summary
Gray8SubImage(int cWidth, int cHeight, int cX, int cY)
          Creates a new instance of Gray8SubImage
 
Method Summary
 Image clone()
          Copy this image
 int getXOffset()
          Get horizontal offset of subimage.
 int getYOffset()
          Get vertical offset of subimage.
 void setXOffset(int nX)
          Change horizontal position of subimage.
 void setYOffset(int nY)
          Change vertical position of subimage.
 java.lang.String toString()
          Return a string describing the image.
 
Methods inherited from class jjil.core.Gray8Image
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

Gray8SubImage

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

Parameters:
cWidth - Image height.
cHeight - Image width.
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 Gray8Image
Returns:
the image copy.

getXOffset

public int getXOffset()
Get horizontal offset of subimage.

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

getYOffset

public int getYOffset()
Get vertical offset of subimage.

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

setXOffset

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

Parameters:
nX - the new horizontal position.

setYOffset

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

Parameters:
nY - the new vertical position.

toString

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

Overrides:
toString in class Gray8Image
Returns:
the string.