Class JavaPixel

java.lang.Object
  |
  +--JavaPixel

public class JavaPixel
extends java.lang.Object

*
class JavaPixel *
a class representing a pixel in a picture *
* @author Mark Guzdial * @version 2


Field Summary
 int x
           
 int y
           
 
Constructor Summary
JavaPixel(JavaPicture pic, int px, int py)
          * * @param pic the JavaPicture object for each the JavaPixel is a pixel for * @param px the x coordinate of the pixel in pic * @param py the y coordinate of the pixel in pic
 
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)
* * @param pic the JavaPicture object for each the JavaPixel is a pixel for * @param px the x coordinate of the pixel in pic * @param py the y coordinate of the pixel in pic

Method Detail

getRed

public int getRed()
Returns the red value of the pixel. * * @return the red value in an integer


getAlpha

public int getAlpha()
Returns the alpha value of the pixel. * * @return the alpha value in an integer


getGreen

public int getGreen()
Returns the green value of the pixel. * * @return the green value in an integer


getBlue

public int getBlue()
Returns the blue value of the pixel. * * @return 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. * * @param nuRed the red value as an integer


setBlue

public void setBlue(int nuBlue)
Sets the blue value of the pixel. * * @param nuBlue the blue value as an integer


setGreen

public void setGreen(int nuGreen)
Sets the green value of the pixel. * * @param nuGreen the green value as an integer