In this homework you are going to write a program that tiles a large, originally
blank picture with a smaller picture. Here's the result of running the program
on a small file named wave.jpg
in the
thumbnails
folder in the gallery we've been using.
HW6.java
copyInto
that takes three parameters, the x and y coordinate of where you want to place a single instance of the picture, and the larger picture object we are copying into.
For example, if pic is the smaller picture and tiled is the larger picture then
the line
pic.copyInto(x,y,tiled);copys
pic
into tiled
starting at upper left location x,y in the picture tiled
.
Picture.java
file and
your HW6.java
file. Picture.java
file and your
HW6.java
file on your T: drive.
Here is what the user input of my version of the program looks like:
Enter in the thumbnails folder you want to tile: wave How many times horizontal: 4 How many times vertical: 3
You can run my version of the program by double clicking on
run.bat
in the folder T:/Harcourt/Fall2008/CS140/HW6/
and entering the input into the black console window.