- return new Rectangle2D.Double(calcPoint.getX(), calcPoint.getY(), width / at.getScaleX(), height / at.getScaleY()).getBounds2D();
- }
-
- private static Point2D calculatePoint2D(DistrictNetworkVertex vertex, Point2D result) {
- Point2D point = vertex.getPoint();
- double x = ModelledCRS.longitudeToX(point.getX());
- double y = ModelledCRS.latitudeToY(-point.getY()); // Inverse because Simantics Diagram is inverted
- if (result == null)
- result = new Point2D.Double(x, y);
- else
- result.setLocation(x, y);
- return result;
+ double x = calcPoint.getX();
+ double y = calcPoint.getY();
+ double widthh = width / at.getScaleX();
+ double heighth = height / at.getScaleY();
+ return new Rectangle2D.Double(x - widthh, y - heighth, widthh * 2, heighth * 2).getBounds2D();