gnu.rfb
Class Rect

java.lang.Object
  extended by gnu.rfb.Rect
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
CopyRect, CoRREStub, Hextile, Raw, RRE

public abstract class Rect
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
 int count
           
 int h
           
 int w
           
 int x
           
 int y
           
 
Constructor Summary
Rect(int x, int y, int w, int h)
           
 
Method Summary
static int bestEncoding(int[] encodings)
          Takes an array of possible encodings and returns the best one.
 java.lang.Object clone()
           
static Rect encode(int encoding, int[] pixels, PixelFormat pixelFormat, int scanline, int x, int y, int w, int h)
           
static Rect encode(int encoding, int[] pixels, PixelFormat pixelFormat, int offsetX, int offsetY, int scanline, int x, int y, int w, int h)
           
static Rect encode(int encoding, PixelFormat pixelFormat, java.awt.Image image, int x, int y, int w, int h)
           
 java.lang.String toString()
           
 void transform(int transformX, int transformY)
           
 void writeData(java.io.DataOutput output)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x

y

public int y

w

public int w

h

public int h

count

public int count
Constructor Detail

Rect

public Rect(int x,
            int y,
            int w,
            int h)
Parameters:
x -
y -
w -
h -
Method Detail

bestEncoding

public static int bestEncoding(int[] encodings)
Takes an array of possible encodings and returns the best one.

Parameters:
encodings - An array of encodings.
Returns:
The best encoding out of the given array.

encode

public static Rect encode(int encoding,
                          PixelFormat pixelFormat,
                          java.awt.Image image,
                          int x,
                          int y,
                          int w,
                          int h)
Parameters:
encoding -
pixelFormat -
image -
x -
y -
w -
h -
Returns:

encode

public static Rect encode(int encoding,
                          int[] pixels,
                          PixelFormat pixelFormat,
                          int scanline,
                          int x,
                          int y,
                          int w,
                          int h)
Parameters:
encoding -
pixels -
pixelFormat -
scanline -
x -
y -
w -
h -
Returns:

encode

public static Rect encode(int encoding,
                          int[] pixels,
                          PixelFormat pixelFormat,
                          int offsetX,
                          int offsetY,
                          int scanline,
                          int x,
                          int y,
                          int w,
                          int h)
Parameters:
encoding -
pixels -
pixelFormat -
offsetX -
offsetY -
scanline -
x -
y -
w -
h -
Returns:

writeData

public void writeData(java.io.DataOutput output)
               throws java.io.IOException
Parameters:
output -
Throws:
java.io.IOException

transform

public void transform(int transformX,
                      int transformY)
Parameters:
transformX -
transformY -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException