Question
package assignment5; import java.awt.geom.Path2D; public class Eagle extends Path2D.Double { public Eagle() { this.moveTo(173, 308); this.curveTo(400, 300, 620, 350, 544, 382); this.lineTo(405, 382); this.curveTo(425, 380,
package assignment5;
import java.awt.geom.Path2D; public class Eagle extends Path2D.Double { public Eagle() { this.moveTo(173, 308); this.curveTo(400, 300, 620, 350, 544, 382); this.lineTo(405, 382); this.curveTo(425, 380, 490, 420, 509, 399); this.quadTo(499, 400, 491, 394); this.curveTo(650, 380, 750, 420, 710, 637); this.curveTo(730, 540, 405, 520, 318, 752); this.quadTo(270, 670, 280, 632); this.quadTo(250, 645, 224, 679); this.quadTo(215, 600, 221, 576); this.quadTo(190, 579, 163, 581); this.quadTo(170, 541, 183, 515); this.quadTo(161, 520, 145, 527); this.quadTo(153, 500, 159, 480); this.quadTo(150, 470, 140, 461); }
Write a Java program to display a rotating eagle. Use the provided Eagle.java for drawing the path of the eagle. Set up a circular clipping path for the logo and fill the background with proper colors. Animate the rotation with a Timer object. Allow the user to stop and resume the animation by clicking the mouse on the panel. When the button "Save image" is clicked, a snapshot of current drawing will be captured and saved to a file named "eagle.png". Name the main class Assignment 5 in the package assignment5. Submit the source files online to folioStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started