September 2005
Beginner
576 pages
13h 6m
English
| Q1: | How can I draw arcs that go clockwise rather than counterclockwise? |
| A1: | You can accomplish this by specifying the size of the arc as a negative number. The arc will begin at the same point, but go in the opposite direction in an elliptical path. For example, the following statement draws an open arc at (35,20) that is 90 degrees long, begins at the 0 degree mark, goes clockwise, and has a height of 20 and a width of 15:
Arc2D.Float smile = new Arc2D.Float(35F, 20F, 15F, 20F,
0F, -90F, Arc2D.Float.OPEN);
|
| Q2: | Ellipses and circles don't have corners. What are the (x,y) coordinates specified with the Ellipses.Float constructor method? |
| A2: | The (x,y) coordinates represent the smallest x value and smallest y value of the oval or circle. If you ... |
Read now
Unlock full access