[java]代码库
//龟盖
g.setColor(Color.yellow);
g.fillOval(x-70, y+60, 220, 270);
g.setColor(Color.black);
g.fillOval(x-60, y+69, 200, 250);
//g.drawOval(x-65, y+70, 200, 280);
g.setColor(Color.yellow);//龟盖
//龟纹
Graphics2D g2d = (Graphics2D) g;
g2d.setStroke(new BasicStroke(3.0f));
//右边线
g.drawLine(x+40, y+70, x+40, y+130);
g.drawLine(x+40, y+130, x-10, y+165);
g.drawLine(x-10, y+165, x-10, y+225);
g.drawLine(x-10, y+225, x+40, y+260);
g.drawLine(x-10, y+165, x-60, y+140);
g.drawLine(x-10, y+225, x-60, y+250);
// 左边线
g.drawLine(x+40, y+130, x+90, y+165);
g.drawLine(x+90, y+165, x+90, y+225);
g.drawLine(x+90, y+225, x+40, y+260);
g.drawLine(x+40, y+260, x+40, y+330);
[代码运行效果截图]
[源代码打包下载]
初级程序员
by: 云代码会员 发表于:2017-07-15 17:21:47 顶(0) | 踩(0) 回复
来看看吧
回复评论