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: -The method accepts the following parameters: x : The x coordinate of the rectangle. y : The y coordinate of the rectangle. width : The width of the rectangle.
Detailed explanation-2: -fillOval(int x, int y, int width, int height) Fills an oval bounded by the specified rectangle with the current color.
Detailed explanation-3: -public void drawRect(int x, int y, int width, int height): draws a rectangle with the specified width and height.
Detailed explanation-4: -In Java, to draw a rectangle (outlines) onto the current graphics context, we can use the following methods provided by the Graphics/Graphics2D class: drawRect(int x, int y, int width, int height) draw3DRect(int x, int y, int width, int height, boolean raised) draw(Rectangle2D)