|
@@ -33,13 +33,18 @@ public class Door extends ModuleInAxis {
|
|
|
System.out.println("room x="+room.getX()+",y="+room.getY()+",door x="+x+",y="+y);
|
|
|
g2d.drawString(x+","+y,x,y);
|
|
|
int radis = config.getRadis();
|
|
|
- g2d.drawArc(x-radis/2, y-radis/2, radis, radis, 0, 90*config.getOpenDir());
|
|
|
+ g2d.drawArc(x-radis, y-radis, radis*2, radis*2, 0, 90*config.getOpenDir());
|
|
|
+ g2d.drawLine(x,y,x,y-radis);
|
|
|
g2d.setColor(Color.GRAY);
|
|
|
// 3. 填充一个扇形
|
|
|
- g2d.fillArc(x-radis/2, y-radis/2, radis, radis, 0, 90*config.getOpenDir());
|
|
|
+ int kedu = 10;
|
|
|
+ for(int i = 1;i<radis*2/kedu;i+=2){
|
|
|
+ int curRadis = radis*2-i*kedu;
|
|
|
+ g2d.drawArc(x-curRadis/2, y-curRadis/2, curRadis, curRadis, 0, 90*config.getOpenDir());
|
|
|
+ }
|
|
|
g2d.drawString(x+","+y,x-10,y+10);
|
|
|
//画贴墙边
|
|
|
- int endx = this.x+radis/2+config.getRightOutLength();
|
|
|
+ int endx = this.x+radis+config.getRightOutLength();
|
|
|
System.out.println("fillRect length = " + endx);
|
|
|
g2d.fillRect(room.getX(),room.getY()- Constant.CLOSE_WALL_LINE_WIDTH/2,endx,Constant.CLOSE_WALL_LINE_WIDTH);
|
|
|
g2d.dispose();
|