794 |
|
|
795 |
// LOGGER.debug("and fix aspect ratio"); |
// LOGGER.debug("and fix aspect ratio"); |
796 |
|
|
797 |
newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, |
newArea = JTSUtil.fixAspectRatio(getVisibleRect(), newArea, |
798 |
false); |
false); |
799 |
} |
} |
800 |
} |
} |
818 |
|
|
819 |
// LOGGER.debug("and fix aspect ratio"); |
// LOGGER.debug("and fix aspect ratio"); |
820 |
|
|
821 |
newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, |
newArea = JTSUtil.fixAspectRatio(getVisibleRect(), newArea, |
822 |
false); |
false); |
823 |
} |
} |
824 |
} |
} |
844 |
|
|
845 |
// LOGGER.debug("and fix aspect ratio"); |
// LOGGER.debug("and fix aspect ratio"); |
846 |
|
|
847 |
newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, |
newArea = JTSUtil.fixAspectRatio(getVisibleRect(), newArea, |
848 |
false); |
false); |
849 |
} |
} |
850 |
} |
} |
870 |
|
|
871 |
// LOGGER.debug("and fix aspect ratio"); |
// LOGGER.debug("and fix aspect ratio"); |
872 |
|
|
873 |
newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, |
newArea = JTSUtil.fixAspectRatio(getVisibleRect(), newArea, |
874 |
false); |
false); |
875 |
} |
} |
876 |
} |
} |
979 |
*/ |
*/ |
980 |
protected boolean drawScaledPreviewImage_Zoom(final Graphics2D graphics) { |
protected boolean drawScaledPreviewImage_Zoom(final Graphics2D graphics) { |
981 |
|
|
982 |
if (1 == 1)return false; |
// if (1 == 1)return false; |
983 |
|
|
984 |
if (quickPreviewHint == 0) |
if (quickPreviewHint == 0) |
985 |
return false; |
return false; |
1055 |
// |
// |
1056 |
if (finalImage == null) { |
if (finalImage == null) { |
1057 |
// Rectangle curPaintArea = getVisibleRect(); |
// Rectangle curPaintArea = getVisibleRect(); |
1058 |
finalImage = new BufferedImage(getBounds().width, |
finalImage = new BufferedImage(getVisibleRect().width, |
1059 |
getBounds().height, IMAGETYPE); |
getVisibleRect().height, IMAGETYPE); |
1060 |
|
|
1061 |
requestStartRendering(); |
requestStartRendering(); |
1062 |
} |
} |
1073 |
private BufferedImage getLocalImage() { |
private BufferedImage getLocalImage() { |
1074 |
|
|
1075 |
if (localImage == null) { |
if (localImage == null) { |
1076 |
localImage = new BufferedImage(getBounds().width, |
localImage = new BufferedImage(getVisibleRect().width, |
1077 |
getBounds().height, IMAGETYPE_withAlpha); |
getVisibleRect().height, IMAGETYPE_withAlpha); |
1078 |
} |
} |
1079 |
|
|
1080 |
return localImage; |
return localImage; |
1155 |
} |
} |
1156 |
|
|
1157 |
// Kartenbereich um 10% vergroessern |
// Kartenbereich um 10% vergroessern |
1158 |
return JTSUtil.fixAspectRatio(this.getBounds(), JTSUtil |
return JTSUtil.fixAspectRatio(getVisibleRect(), JTSUtil |
1159 |
.expandEnvelope(layerBounds, 0.1), true); |
.expandEnvelope(layerBounds, 0.1), true); |
1160 |
} |
} |
1161 |
return maxExtend; |
return maxExtend; |
1519 |
*/ |
*/ |
1520 |
public void performPan() { |
public void performPan() { |
1521 |
|
|
1522 |
final Rectangle winBounds = getBounds(); |
Rectangle winBounds = getVisibleRect(); |
1523 |
|
|
1524 |
winBounds.translate(-imageOrigin.x, -imageOrigin.y); |
winBounds.translate(-imageOrigin.x, -imageOrigin.y); |
1525 |
final Envelope newMapArea = tranformWindowToGeo(winBounds.x, |
final Envelope newMapArea = tranformWindowToGeo(winBounds.x, |
1526 |
winBounds.y, winBounds.x + winBounds.width, winBounds.y |
winBounds.y, winBounds.x + winBounds.width, winBounds.y |
1643 |
private void resetTransforms() { |
private void resetTransforms() { |
1644 |
ReferencedEnvelope refMapEnv = new ReferencedEnvelope(mapArea, |
ReferencedEnvelope refMapEnv = new ReferencedEnvelope(mapArea, |
1645 |
getContext().getCoordinateReferenceSystem()); |
getContext().getCoordinateReferenceSystem()); |
1646 |
// |
|
1647 |
Rectangle paintArea = getBounds(); |
Rectangle paintArea = getVisibleRect(); // NOT USE GET BOUNDS! |
1648 |
|
|
|
if (!getBounds().equals(getVisibleRect())) { |
|
|
System.out.println("did we expect that?"); |
|
|
} |
|
1649 |
// |
// |
1650 |
// double xscale = paintArea.getWidth() / refEnv.getWidth(); |
// double xscale = paintArea.getWidth() / refEnv.getWidth(); |
1651 |
// double yscale = paintArea.getHeight() / refEnv.getHeight(); |
// double yscale = paintArea.getHeight() / refEnv.getHeight(); |
2168 |
|
|
2169 |
// Paint a logo to the bottom right if available |
// Paint a logo to the bottom right if available |
2170 |
if (mapImage != null) { |
if (mapImage != null) { |
2171 |
graphics.drawImage(mapImage, getBounds().width |
Rectangle visibleRect = getVisibleRect(); |
2172 |
- mapImage.getWidth() - 10, getBounds().height |
graphics.drawImage(mapImage, visibleRect.width |
2173 |
|
- mapImage.getWidth() - 10, getVisibleRect().height |
2174 |
- mapImage.getHeight() - 10, null); |
- mapImage.getHeight() - 10, null); |
2175 |
} |
} |
2176 |
|
|