COMPUTER SCIENCE AND ENGINEERING
COMPUTER GRAPHICS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
drawing filled rectangles
|
|
shifting the origin in the coordinate frame
|
|
rotating the coordinate frame
|
|
different font sizes
|
Detailed explanation-1: -The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images. A Graphics object encapsulates state information needed for the basic rendering operations that Java supports.
Detailed explanation-2: -Commonly used methods of Graphics class: public abstract void drawOval(int x, int y, int width, int height): is used to draw oval with the specified width and height. public abstract void fillOval(int x, int y, int width, int height): is used to fill oval with the default color and specified width and height.
Detailed explanation-3: -Answer: Java. awt class provides many methods for graphics programming.