张世豪
昨天 f0d6cefec73492c29d8323e66fb92ee6bbb60cd2
src/zhuye/MapRenderer.java
@@ -1403,7 +1403,8 @@
            
            // 将世界坐标转换为屏幕坐标(用于文字显示)
            Point2D.Double worldMid = new Point2D.Double(midX, midY);
            Point2D.Double screenMid = worldToScreen(worldMid);
            Point2D.Double screenMid = new Point2D.Double();
            originalTransform.transform(worldMid, screenMid);
            
            // 恢复原始变换以绘制文字(固定大小,不随缩放变化)
            g2d.setTransform(new AffineTransform());
@@ -1958,6 +1959,7 @@
                   .append(',')
                   .append(formatCoordinate(point.y));
            if (i < boundary.size() - 1) {
                builder.append(';');
            }
        }
@@ -3516,4 +3518,17 @@
        this.boundaryPreviewUpdateCallback = callback;
    }
    /**
     * 将视图中心对准当前边界的几何中心
     */
    public void centerViewOnBoundary() {
        if (currentBoundary == null || currentBoundary.isEmpty()) {
            return;
        }
        Rectangle2D.Double bounds = computeBounds(currentBoundary);
        if (bounds != null) {
            fitBoundsToView(bounds);
        }
    }
}