public static void main(String[] args) {
   Picture p = new Picture(FileChooser.getMediaPath("horse.jpg"));
   Graphics g = p.getGraphics();
   Point ul = new Point(68, 24);
   Point te = new Point(182, 123);
   String message = "This is a test." + "  Of a message with more than one line in it.";
   SpeechBalloon balloon = new SpeechBalloon(ul, 200, te, message);
   balloon.draw(g);
   p.show();
 }
Esempio n. 2
0
 public static void main(String[] args) {
   String fileName = FileChooser.pickAFile();
   Picture pictObj = new Picture(fileName);
   pictObj.changeWhole(.5);
   pictObj.changeWhole(.8);
   pictObj.scrible(200, 200, 50);
   pictObj.scrible(350, 320, 100);
   pictObj.ManipBoxUniformly(200, 200, 300, 300, .2);
   pictObj.ManipBoxUniformly(100, 100, 400, 300, .5);
   pictObj.ManipBoxPattern(100, 100, 300, 300, .3);
   pictObj.ManipBoxPattern(300, 300, 400, 400, .8);
   pictObj.explore();
 }