Class FlipLeftRight

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

public class FlipLeftRight
extends java.lang.Object
implements Picture

FlipLeftRight - Flips the specified picture along the vertical axis.

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

Constructor Summary
FlipLeftRight(Picture basePicture)
          Constructs the new flipped picture based on the input picture
 
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

FlipLeftRight

public FlipLeftRight(Picture basePicture)
Constructs the new flipped picture based on the input picture

Parameters:
basePicture - Input picture to be flipped
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