Revision 134 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
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