DeviceWorkstation.st
changeset 999 abddc647ee17
parent 996 ee97acd919e2
child 1000 bffb1e88c1de
--- a/DeviceWorkstation.st	Wed Jul 24 21:34:28 1996 +0200
+++ b/DeviceWorkstation.st	Wed Jul 24 21:47:02 1996 +0200
@@ -1401,7 +1401,8 @@
     "set the height in millimeter of the display 
      - needed since some displays do not tell the truth or do not know it"
 
-    heightMM := aNumber
+    heightMM := aNumber.
+    resolutionVer := nil.
 !
 
 horizontalPixelPerInch
@@ -1413,7 +1414,11 @@
 horizontalPixelPerMillimeter
     "return the number of horizontal pixels per millimeter of the display"
 
-    ^ width / widthMM
+    resolutionHor notNil ifTrue:[
+	^ resolutionHor
+    ].
+    resolutionHor := width / widthMM.
+    ^ resolutionHor
 !
 
 pixelPerInch
@@ -1448,7 +1453,11 @@
 verticalPixelPerMillimeter
     "return the number of vertical pixels per millimeter of the display"
 
-    ^ height / heightMM
+    resolutionVer notNil ifTrue:[
+	^ resolutionVer
+    ].
+    resolutionVer := height / heightMM.
+    ^ resolutionVer
 !
 
 virtualExtent
@@ -1502,7 +1511,8 @@
     "set the width in millimeter of the display 
      - needed since some displays do not tell the truth or do not know it"
 
-    widthMM := aNumber
+    widthMM := aNumber.
+    resolutionHor := nil.
 ! !
 
 !DeviceWorkstation methodsFor:'accessing keyboard mappings'!
@@ -4574,6 +4584,6 @@
 !DeviceWorkstation  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.122 1996-07-24 11:57:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.123 1996-07-24 19:47:02 cg Exp $'
 ! !
 DeviceWorkstation initialize!