|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectPixelRectangle
public class PixelRectangle
PixelRectangle - a rectangular area of pixels.
To represent rectangular groups of pixels as a single entitly, two things are needed:
| Field Summary | |
|---|---|
int[] |
pixels
Array of individual pixels represented as ints, 4 bytes: opacity, red, green, and blue. |
int |
width
The number of columns in a row of pixels in the array. |
| Constructor Summary | |
|---|---|
PixelRectangle(int[] pixels,
int numCol)
Instantiate a PixelRectangle given its constituents. |
|
| Method Summary | |
|---|---|
java.awt.Image |
toImage()
Create an Image to match the array of picture's pixels. |
java.lang.String |
toString()
Override Object.toString() for debugging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int[] pixels
public int width
| Constructor Detail |
|---|
public PixelRectangle(int[] pixels,
int numCol)
pixels - array of individual pixels in int formatnumCol - the number of columns making up a single
row of pixels| Method Detail |
|---|
public java.awt.Image toImage()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||