C# topic-GDI+ drawing system

1 Single choice (2 points)
Which of the following is the abbreviation of the graphics device interface ()

A.GDI
B.MDI
C.CLR
D.SDI

Answer: A

2 Single selection (2 points) to
define a pen object, which of the following is wrong ()

A.Pen myPen=new Pen(new SolidBrush(Color.Red))
B.Pen myPen=new Pen(Color.Red)
C.Pen myPen=new Pen(new Bitmap(“e:\1.jpg”))
D.Pen myPen=new Pen(Color.Red,5)

Answer: C

3 Single choice (2 points)
Which of the following methods is not the drawing method provided in the Graphics class ()

A.DrawArc
B.DrawLine
C.DrawRectangle
D.DrawCircle

Answer: D

4 Single choice (2 points)
The function completed by the following code, which one is correct ()

Pen myPen = new Pen(Color.Blue, 2);

Graphics g = e.Graphics;

g.DrawRectangle(myPen, 10, 10, 200, 10);

A. Use a blue paintbrush to draw a rectangle
with coordinates (10,10) for the upper left corner and (200,10) for the lower right corner B. Use a blue paintbrush to draw a rectangle with coordinates (10,10) for the upper left corner , A rectangle
with a width of 200 and a height of 10 C. Fill a rectangle with coordinates (10,10) in the upper left corner, a width of 200 and a height of 10
with a blue brush. D. Fill it with a blue brush A rectangle with coordinates (10,10) in the upper left corner and (200,10) in the lower right corner

Answer: B

5 Judgment (2 points)
Use the GDI+ drawing interface to draw on the form, but not on the control.

Answer: wrong

6 Judgment (2 points)
In the GDI+ drawing interface, a Graphics object must be created before GDI+ can be used for drawing operations.

Answer: yes

7 Judgment (2 points)
DrawString is a method of drawing text, and determining the color of the drawn text is a Pen object parameter.

Answer: wrong

Guess you like

Origin blog.csdn.net/NikoHsu/article/details/105569353