COMPUTER SCIENCE AND ENGINEERING
COMPUTER GRAPHICS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
the x value starting position
|
|
the y value starting position
|
|
the width of the rectangle
|
|
the height of the rectangle
|
Detailed explanation-1: -drawOval. Draws the outline of an oval. The result is a circle or ellipse that fits within the rectangle specified by the x, y, width, and height arguments. The oval covers an area that is width + 1 pixels wide and height + 1 pixels tall.
Detailed explanation-2: -drawOval() This draws a circle or an oval that fits within the rectangle specified by the X, Y, width and height arguments. The oval is drawn inside a rectangle whose upper left hand corner is at (X, Y), and whose width and height are as specified. The measurements are in terms of pixels.
Detailed explanation-3: -We can draw shapes on the Java applet. In this article we will draw a ellipse on Java applet by two ways . By using the drawOval(int x, int y, int width, int height) or by using mathematical formula (X= A * sin a, Y= B *cos a, where A and B are major and minor axes and a is the angle ) .
Detailed explanation-4: -The drawRect method draws a rectangle outline for the given position and size. We use the graphics context’s current color to draw the rectangle’s outline color.