added resolution & drawingResolution
authorClaus Gittinger <cg@exept.de>
Tue, 04 Jun 1996 17:57:01 +0200
changeset 783 6492ac9c2494
parent 782 51c03bc803ce
child 784 be774c8a672f
added resolution & drawingResolution
DevWorkst.st
DeviceWorkstation.st
--- a/DevWorkst.st	Mon Jun 03 11:53:59 1996 +0200
+++ b/DevWorkst.st	Tue Jun 04 17:57:01 1996 +0200
@@ -1214,6 +1214,23 @@
     ^ (width // 2) @ (height // 2)
 !
 
+drawingResolution
+    "return a point consisting of the actual drawing resolution
+     in pixel-per-inch horizontally and vertically.
+     On screen devices, this is the same as resolution; on postscript
+     devices, this is usually higher than the coordinate systems unit.
+     This method is provided for compatibility with postscript media,
+     to query the device if sub-pixel-coordinate drawing is possible.
+     (there are a few situations, in which resolution-independ drawing
+      leads to ugly looking output ... knowing about subPixel resolution
+      may help there.)"
+
+    ^ self resolution
+
+    "Created: 4.6.1996 / 15:20:43 / cg"
+    "Modified: 4.6.1996 / 17:56:26 / cg"
+!
+
 extent
     "return the extent of the display (in pixels)"
 
@@ -4133,6 +4150,6 @@
 !DeviceWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.93 1996-05-29 11:25:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.94 1996-06-04 15:57:01 cg Exp $'
 ! !
 DeviceWorkstation initialize!
--- a/DeviceWorkstation.st	Mon Jun 03 11:53:59 1996 +0200
+++ b/DeviceWorkstation.st	Tue Jun 04 17:57:01 1996 +0200
@@ -1214,6 +1214,23 @@
     ^ (width // 2) @ (height // 2)
 !
 
+drawingResolution
+    "return a point consisting of the actual drawing resolution
+     in pixel-per-inch horizontally and vertically.
+     On screen devices, this is the same as resolution; on postscript
+     devices, this is usually higher than the coordinate systems unit.
+     This method is provided for compatibility with postscript media,
+     to query the device if sub-pixel-coordinate drawing is possible.
+     (there are a few situations, in which resolution-independ drawing
+      leads to ugly looking output ... knowing about subPixel resolution
+      may help there.)"
+
+    ^ self resolution
+
+    "Created: 4.6.1996 / 15:20:43 / cg"
+    "Modified: 4.6.1996 / 17:56:26 / cg"
+!
+
 extent
     "return the extent of the display (in pixels)"
 
@@ -4133,6 +4150,6 @@
 !DeviceWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.93 1996-05-29 11:25:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.94 1996-06-04 15:57:01 cg Exp $'
 ! !
 DeviceWorkstation initialize!