Revision 134
trunk/org.gvsig.app.document.layout.app/pom.xml | ||
---|---|---|
11 | 11 |
<parent> |
12 | 12 |
<groupId>org.gvsig</groupId> |
13 | 13 |
<artifactId>org.gvsig.desktop</artifactId> |
14 |
<version>2.0.39</version>
|
|
14 |
<version>2.0.40-SNAPSHOT</version>
|
|
15 | 15 |
</parent> |
16 | 16 |
|
17 | 17 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-app-document-layout</url> |
trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/FFrameView.java | ||
---|---|---|
466 | 466 |
&& !refresh |
467 | 467 |
&& !(rectangleLayout.getWidth() > rectangleView.getWidth() || rectangleLayout.getHeight() > rectangleView.getHeight()))) { |
468 | 468 |
|
469 |
double scale1_1 = MapContext.getScreenDPI() / 2.54;
|
|
469 |
double scale1_1 = viewPort.getDPI() / 2.54;
|
|
470 | 470 |
/* |
471 | 471 |
* This is the ratio between the size assumed by the |
472 | 472 |
* mapcontext drawer and the true size on screen |
trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/FLayoutZooms.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import org.slf4j.Logger; |
33 | 33 |
import org.slf4j.LoggerFactory; |
34 |
|
|
35 | 34 |
import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
36 | 35 |
import org.gvsig.app.project.documents.layout.fframes.IFFrameUseFMap; |
37 | 36 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
37 |
import org.gvsig.compat.CompatLocator; |
|
38 | 38 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
39 | 39 |
import org.gvsig.fmap.geom.GeometryLocator; |
40 | 40 |
import org.gvsig.fmap.geom.GeometryManager; |
... | ... | |
279 | 279 |
* Aplica el zoom real teniendo en cuenta la resoluci?n de pantalla. |
280 | 280 |
*/ |
281 | 281 |
public void realZoom() { |
282 |
Preferences prefsResolution = |
|
283 |
Preferences.userRoot().node("gvsig.configuration.screen"); |
|
284 | 282 |
double cm = |
285 | 283 |
layout.getLayoutContext().getAttributes() |
286 | 284 |
.getPixXCm(layout.getLayoutControl().getRect()); |
287 |
Toolkit kit = Toolkit.getDefaultToolkit(); |
|
288 |
double dpi = prefsResolution.getInt("dpi", kit.getScreenResolution()); |
|
285 |
double dpi = CompatLocator.getGraphicsUtils().getScreenDPI(); |
|
289 | 286 |
double dif = (cm * Attributes.PULGADA) / dpi; |
290 | 287 |
setZoom(1 / dif, new Point(layout.getWidth() / 2, |
291 | 288 |
layout.getHeight() / 2)); |
Also available in: Unified diff