Class Green

java.lang.Object
  extended byGreen
All Implemented Interfaces:
Picture

public class Green
extends java.lang.Object
implements Picture

Green - Filters the specified picture to show only the green color channel. That is, it elminiates all of the red and blue contribution to the color.

Author:
Ben Bederson, Bill Pugh Copyright (C) 2003 University of Maryland

Constructor Summary
Green(Picture basePicture)
           
 
Method Summary
 PictureColor getColor(int x, int y)
          This specifies the content of a picture by returning the color of the picture at each pixel (i.e., position).
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Green

public Green(Picture basePicture)
Method Detail

getColor

public PictureColor getColor(int x,
                             int y)
Description copied from interface: Picture
This specifies the content of a picture by returning the color of the picture at each pixel (i.e., position).

Specified by:
getColor in interface Picture
Parameters:
x - The column within the picture
y - The row within the picture
Returns:
The color of the picture at the specified location

getWidth

public int getWidth()
Specified by:
getWidth in interface Picture

getHeight

public int getHeight()
Specified by:
getHeight in interface Picture