Class CombineLeftRight

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

public class CombineLeftRight
extends java.lang.Object
implements Picture

LeftRight - Combines two pictures into a single larger picture with one input picture on the left and one input picture on the right

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

Constructor Summary
CombineLeftRight(Picture leftPicture, Picture rightPicture)
          Constructs a new picture combining two input pictures.
 
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

CombineLeftRight

public CombineLeftRight(Picture leftPicture,
                        Picture rightPicture)
Constructs a new picture combining two input pictures. The resultant picture places one picture on the left and the other on the right.

Parameters:
leftPicture -
rightPicture -
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