/*
CAMPFIRE.java - Graphics project used to arrange 
images on the screen for cover to CAMPFIRE SONGS.
Created by Randy McGirr, 2011
This applet requires extra memory to run in appletviewer:
appletviewer -J-Xmx128m CAMPFIRE.java
*/
import java.awt.*;
import java.awt.geom.*;
import java.applet.*;
import java.util.*;

public class CAMPFIRE extends Applet{
Dimension d;
Image offI;
Image sawyer, james, jared, pat, paul, zeke, charlie, fire, outhouse,
bino, dawg, left, gun, center, owl;
//AffineTransform trans;
int currentAngle, w, h;
Rectangle rect;
Color bg,gd;

public void init(){
d = getSize();
bg=new Color(0,0,45);
gd=new Color(45,45,20);
offI=createImage(d.width,d.height);
owl = getImage(getDocumentBase(), "OWL.gif");
center = getImage(getDocumentBase(), "CENTER.gif");
gun = getImage(getDocumentBase(), "GUN.gif");
left = getImage(getDocumentBase(), "LEFT.gif");
bino = getImage(getDocumentBase(), "BINO.gif");
dawg = getImage(getDocumentBase(), "DAWG.gif");
fire = getImage(getDocumentBase(), "FIRE.gif");
outhouse = getImage(getDocumentBase(), "OUTHOUSE.gif");
charlie = getImage(getDocumentBase(), "CHARLIE.gif");
jared = getImage(getDocumentBase(), "JARED.gif");
sawyer = getImage(getDocumentBase(), "SAWYER.gif");
james = getImage(getDocumentBase(), "JAMES.gif");
pat = getImage(getDocumentBase(), "PAT.gif");
paul = getImage(getDocumentBase(), "PAUL.gif");
zeke = getImage(getDocumentBase(), "ZEKE.gif");
rect=this.getBounds();
currentAngle=0;
w=20;
h=20;
//turtle=turtle.getScaledInstance(w,h,Image.SCALE_SMOOTH);
//trans=new AffineTransform();
}

//turtle=turtle.getScaledInstance(w,h,Image.SCALE_SMOOTH);
//trans.setToTranslation((rect.width-turtle.getWidth(this))/2,(rect.height-turtle.getHeight(this))/2);
//trans.rotate(Math.toRadians(currentAngle), turtle.getWidth(this)/2, turtle.getHeight(this)/2);

public void paint(Graphics g){
Graphics2D offG = (Graphics2D)offI.getGraphics(); 
offG.setColor(bg);
offG.fillRect(0,0,d.width,d.height);
offG.setColor(gd);
offG.fillRect(0,400,d.width,d.height-300);
// drawImage(image, x, y, w, h, this)
offG.drawImage(center,170,-40,350,520,this);
offG.drawImage(left,-160,50,500,550,this);
offG.drawImage(bino,170,320,180,180,this);
offG.drawImage(dawg,310,330,180,180,this);
offG.drawImage(gun,430,340,180,180,this);
offG.drawImage(owl,400,50,350,520,this);
offG.drawImage(outhouse,55,265,190,305,this);
offG.drawImage(charlie,250,400,160,295,this);
offG.drawImage(paul,350,480,150,250,this);
offG.drawImage(jared,160,510,80,180,this);
offG.drawImage(fire,160,480,300,300,this);
offG.drawImage(sawyer,20,550,300,240,this);
offG.drawImage(pat,390,530,200,230,this);
offG.drawImage(james,300,630,230,200,this);
offG.drawImage(zeke,140,620,200,230,this);
g.drawImage(offI,0,0,this);
}
}
//<applet code=CAMPFIRE.class height=1000 width=640></applet>