void drawArc(int top,int left,int width,int height,int startAngle,int sweepAngle)
void fillArc(int top,int left,int width,int start Angle,int sweepAngle)
The arc is drawn counterclockwise if sweep angle is positive if it is negativearc will drawn clockwise.
HTML CODING:
<body>
<applet code="arc" width="300" height="300">
</applet>
</body>
</html>
JAVA CODING:
import java.applet.*;import java.awt.*;
public class arc extends Applet
{
public void paint(Graphics g)
{
g.drawArc(10,40,70,70,0,75);
g.fillArc(100,40,70,70,0,75);
g.fillArc(100,100,70,90,0,270);
g.drawArc(200,80,80,80,0,180);
}
}
No comments:
Post a Comment