Exercises
22.3 (Enhanced
DrawStarsapp) Modify theDrawStarsexample in Section22.5 so that all the stars haveRotatetransition animations that execute indefinitely—that is, set each animation’s cycle count toAnimation.INDEFINITE.22.4 (
PolyLineapp) Create an app in which, as the user moves the mouse cursor around the window, aCircleandPolylinefollow the cursor. The app should appear as shown in Fig.22.18 . There should always be aCirclecentered at the current mouse-cursor location, and that location should also be the first point in thePolyline. As you respond to each mouse-move event, use the mouse cursor’s location as theCircle’s new center and insert that location at the beginning of thePolyline’s points collection. The
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access