瀏覽代碼

getCenter image scales

Gilian Joosen 10 年之前
父節點
當前提交
95094629f9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/gui/simulator/DrawEngine.java

+ 1 - 1
src/gui/simulator/DrawEngine.java

@@ -54,7 +54,7 @@ public abstract class DrawEngine {
     }
 
     public Point2D.Double getCenter(){
-        Point2D.Double center = new Point2D.Double(x + this.image.getWidth(null) / 2, y + this.image.getHeight(null)/2);
+        Point2D.Double center = new Point2D.Double(x + this.image.getWidth(null)*scale / 2, y + this.image.getHeight(null)*scale/2);
         return center;
     }