| ||||||||||
public class PSETest { public static void main(String [] args) { FileChooser.setMediaPath("D:/cs1316/mediasources/"); Picture dog = new Picture(FileChooser.getMediaPath("dog-blue.jpg")); dog.scale(.25) PositionedSceneElement dognode = new PositionedSceneElement(dog); Picture house = new Picture(FileChooser.getMediaPath("house-blue.jpg")); PositionedSceneElement housenode = new PositionedSceneElement(house); PositionedSceneElement housenode2 = new PositionedSceneElement(house); PositionedSceneElement housenode3 = new PositionedSceneElement(house); Picture tree = new Picture(FileChooser.getMediaPath("tree-blue.jpg")); PositionedSceneElement treenode = new PositionedSceneElement(tree); PositionedSceneElement treenode2 = new PositionedSceneElement(tree); PositionedSceneElement treenode3 = new PositionedSceneElement(tree); Picture bg = new Picture(FileChooser.pickAFile("jungle.jpg")); dognode.setNext(housenode); housenode.setNext(housenode2); housenode2.setNext(housenode3); housenode3.setNext(treenode); treenode.setNext(treenode2); treenode2.setNext(treenode3); treenode.drawFromMeOn(bg); bg.show(); } } |
public class PSETest { public static void main(String [] args) { FileChooser.setMediaPath("D:/cs1316/mediasources/"); Picture dog = new Picture(FileChooser.getMediaPath("dog-blue.jpg")); PositionedSceneElement dognode = new PositionedSceneElement(dog.scale(0.25)); Picture house = new Picture(FileChooser.getMediaPath("house.jpg")); PositionedSceneElement housenode = new PositionedSceneElement(house); PositionedSceneElement house2 = new PositionedSceneElement(house); PositionedSceneElement house3 = new PositionedSceneElement(house); Picture tree = new Picture(FileChooser.getMediaPath("tree-blue.jpg")); PositionedSceneElement treenode = new PositionedSceneElement(tree); PositionedSceneElement treenode2 = new PositionedSceneElement(tree); PositionedSceneElement treenode3 = new PositionedSceneElement(tree); dognode.setNext(housenode); housenode.setNext(house2); house2.setNext(house3); house3.setNext(treenode); treenode.setNext(treenode2) treenode2.setNext(treenode3); Picture bg = new Picture(FileChooser.getMediaPath("jungle.jpg"));); dognode.drawFromMeOn(bg); bg.show(); } }Is that correct? |
public class PSETest { public static void main(String [] args) { FileChooser.setMediaPath("D:/cs1316/mediasources/"); Picture dog = new Picture(FileChooser.getMediaPath("dog-blue.jpg")); PositionedSceneElement dognode = new PositionedSceneElement(dog.scale(0.25)); Picture tree = new Picture(FileChooser.getMediaPath("tree-blue.jpg")); PositionedSceneElement treenode = new PositionedSceneElement(tree); Picture house = new Picture(FileChooser.getMediaPath("house-blue.jpg")); PositionedSceneElement housenode = new PositionedSceneElement(house); dognode.repeatNext(treenode,3); dognode.repeatNextInserting(housenode,3); Picture jungle = new Picture(FileChooser.getMediaPath(“jungle.jpg”)); dognode.drawFromMeOn(jungle); jungle.show(); } } // that's gotta be right, right? |