Class JavaPixel

java.lang.Object
  |
  +--JavaPixel

public class JavaPixel
extends java.lang.Object

class JavaPixel
a class representing a pixel in a picture


Field Summary
 int x
           
 int y
           
 
Constructor Summary
JavaPixel(JavaPicture pic, int px, int py)
           
 
Method Summary
 int getAlpha()
          Returns the alpha value of the pixel.
 int getBlue()
          Returns the blue value of the pixel.
 int getGreen()
          Returns the green value of the pixel.
 int getRed()
          Returns the red value of the pixel.
 void setBlue(int nuBlue)
          Sets the blue value of the pixel.
 void setGreen(int nuGreen)
          Sets the green value of the pixel.
 void setPixel()
          actually sets the integer (or basic) value of the pixel once the separate red, green, blue and alpha values are set
 void setRed(int nuRed)
          Sets the red value of the pixel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public int x

y

public int y
Constructor Detail

JavaPixel

public JavaPixel(JavaPicture pic,
                 int px,
                 int py)
Parameters:
pic - the JavaPicture object for each the JavaPixel is a pixel for
px - the x coordinate of the pixel in pic
py - the y coordinate of the pixel in pic
Method Detail

getRed

public int getRed()
Returns the red value of the pixel.

Returns:
the red value in an integer

getAlpha

public int getAlpha()
Returns the alpha value of the pixel.

Returns:
the alpha value in an integer

getGreen

public int getGreen()
Returns the green value of the pixel.

Returns:
the green value in an integer

getBlue

public int getBlue()
Returns the blue value of the pixel.

Returns:
the blue value in an integer

setPixel

public void setPixel()
actually sets the integer (or basic) value of the pixel once the separate red, green, blue and alpha values are set


setRed

public void setRed(int nuRed)
Sets the red value of the pixel.

Parameters:
nuRed - the red value as an integer

setBlue

public void setBlue(int nuBlue)
Sets the blue value of the pixel.

Parameters:
nuBlue - the blue value as an integer

setGreen

public void setGreen(int nuGreen)
Sets the green value of the pixel.

Parameters:
nuGreen - the green value as an integer