• 2021-04-14
    中国大学MOOC: 下列代码完成的功能,哪项表述正确()Pen myPen = new Pen(Color.Blue, 2);Graphics g = e.Graphics; g.DrawRectangle(myPen, 10, 10, 200, 10);
  • 用蓝色的画笔画了一个左上角坐标为(10,10),宽为200,高为10的矩形

    举一反三

    内容

    • 0

      下列定义画笔对象p的语句中,正确的是___________。 A: Dim p As new Pen = Color.Red B: Dim p As Pen = New Pen(Color.Red, 3) C: Dim p As new Pen = Pen(Color.Red,1) D: Dim p As Pen(Color.Black) E: Dim p = Pen(Color.Black,2)

    • 1

      [color=#000000]鹿茸的用量为∶ [/color] A: 3~10 g B: .1~3 g C: 3~5 g D: 10~15 g E: 15~20 g

    • 2

      正确定义画笔的语句是: A: Pen p = new Pen(); B: Pen p = new Pen(3); C: Pen p = new Pen(Color.Red, 3); D: 都不对

    • 3

      在JAVA语言中,下列语句( )可以画出一矩形框架,其距左边界为0像素,距上边界为10像素,宽为30像素,高为40像素。 A: Graphics g;g.drawRect(10,0,30,40); B: Graphics g;g.drawRect(0,10,30,40); C: Graphics g;g.drawRect(30,40,10, 0); D: Graphics g;g.drawRect(30,40,0,10);

    • 4

      使用GDI+绘制线条,需要先创建Graphics对象,然后创建_____对象,才可以使用DrawLine方法绘制线条。 A: Graphics B: Font C: Brush D: Pen