Browse Source

贴墙边可旋转

duh 6 years ago
parent
commit
fed5c69d52
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/java/utils/TemplateUtils.java

+ 2 - 2
src/main/java/utils/TemplateUtils.java

@@ -76,7 +76,7 @@ public class TemplateUtils {
                     g2d.fillRect(x1,y1+width- Constant.CLOSE_WALL_LINE_WIDTH/2,length,Constant.CLOSE_WALL_LINE_WIDTH);
                     break;
                 case 2:
-                    g2d.fillRect(x1+length-Constant.CLOSE_WALL_LINE_WIDTH/2,y1,length,Constant.CLOSE_WALL_LINE_WIDTH);
+                    g2d.fillRect(x1+length-Constant.CLOSE_WALL_LINE_WIDTH/2,y1,Constant.CLOSE_WALL_LINE_WIDTH,width);
                     break;
                 case 3:
                     g2d.fillRect(x1,y1- Constant.CLOSE_WALL_LINE_WIDTH/2,length,Constant.CLOSE_WALL_LINE_WIDTH);
@@ -151,7 +151,7 @@ public class TemplateUtils {
         List<Integer> newlist = new ArrayList<>();
         for(int i = 0;i<list.size();i++){
             int alignWall = list.get(i);
-            alignWall = alignWall%4 + 1;
+            alignWall = (alignWall+rotateRange-1)%4+1;
             newlist.add(alignWall);
         }
         template.setAlignWall(newlist);