commentary
authorClaus Gittinger <cg@exept.de>
Wed, 22 May 1996 13:26:15 +0200
changeset 710 f80fd1a73956
parent 709 6a8d793633ee
child 711 8aa1b1a9536f
commentary
DevDraw.st
Font.st
--- a/DevDraw.st	Wed May 22 11:19:17 1996 +0200
+++ b/DevDraw.st	Wed May 22 13:26:15 1996 +0200
@@ -258,51 +258,53 @@
     "Modified: 10.4.1996 / 14:32:22 / cg"
 !
 
-clipRect:aRectangle
+clipRect:aRectangleOrNil
     "set the clipping rectangle for drawing (in logical coordinates);
      a nil argument turn off clipping (i.e. whole view is drawable)"
 
     |x y w h|
 
-    aRectangle isNil ifTrue:[
-	clipRect isNil ifTrue:[^ self].
-	gcId notNil ifTrue:[
-	    device noClipIn:gcId
-	]
+    aRectangleOrNil isNil ifTrue:[
+        clipRect isNil ifTrue:[^ self].
+        gcId notNil ifTrue:[
+            device noClipIn:gcId
+        ]
     ] ifFalse:[
-	clipRect notNil ifTrue:[
-	    (clipRect = aRectangle) ifTrue:[^ self]
-	].
-	gcId notNil ifTrue:[
-	    x := aRectangle left.
-	    y := aRectangle top.
-	    w := aRectangle width.
-	    h := aRectangle height.
-	    transformation notNil ifTrue:[
-		x := transformation applyToX:x.
-		y := transformation applyToY:y.
-		w := transformation applyScaleX:w.
-		h := transformation applyScaleY:h.
-	    ].
-	    (x class == SmallInteger) ifFalse:[
-		w := w + (x - x truncated).
-		x := x truncated
-	    ].
-	    (y class == SmallInteger) ifFalse:[
-		h := h + (y - y truncated).
-		y := y truncated
-	    ].
-	    (w class == SmallInteger) ifFalse:[
-		w := w truncated + 1
-	    ].
-	    (h class == SmallInteger) ifFalse:[
-		h := h truncated + 1
-	    ].
-
-	    device setClipX:x y:y width:w height:h in:gcId
-	]
+        clipRect notNil ifTrue:[
+            (clipRect = aRectangleOrNil) ifTrue:[^ self]
+        ].
+        gcId notNil ifTrue:[
+            x := aRectangleOrNil left.
+            y := aRectangleOrNil top.
+            w := aRectangleOrNil width.
+            h := aRectangleOrNil height.
+            transformation notNil ifTrue:[
+                x := transformation applyToX:x.
+                y := transformation applyToY:y.
+                w := transformation applyScaleX:w.
+                h := transformation applyScaleY:h.
+            ].
+            (x class == SmallInteger) ifFalse:[
+                w := w + (x - x truncated).
+                x := x truncated
+            ].
+            (y class == SmallInteger) ifFalse:[
+                h := h + (y - y truncated).
+                y := y truncated
+            ].
+            (w class == SmallInteger) ifFalse:[
+                w := w truncated + 1
+            ].
+            (h class == SmallInteger) ifFalse:[
+                h := h truncated + 1
+            ].
+
+            device setClipX:x y:y width:w height:h in:gcId
+        ]
     ].
-    clipRect := aRectangle
+    clipRect := aRectangleOrNil
+
+    "Modified: 22.5.1996 / 13:12:07 / cg"
 !
 
 clippingRectangleOrNil
@@ -3138,6 +3140,6 @@
 !DeviceDrawable class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/DevDraw.st,v 1.52 1996-05-21 19:37:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/DevDraw.st,v 1.53 1996-05-22 11:26:15 cg Exp $'
 ! !
 DeviceDrawable initialize!
--- a/Font.st	Wed May 22 11:19:17 1996 +0200
+++ b/Font.st	Wed May 22 13:26:15 1996 +0200
@@ -618,6 +618,8 @@
         maxWidth := device maxWidthOfFont:fontId.
         width := device widthOf:' ' inFont:fontId.
         width < minWidth ifTrue:[
+            "/ some systems/fonts return a wrong value (0) for space-width
+            "/ - at least with X11 ...
             width := minWidth
         ]
     ] ifFalse:[
@@ -632,7 +634,7 @@
     ].
     isFixedWidth := minWidth == maxWidth
 
-    "Modified: 20.4.1996 / 23:26:13 / cg"
+    "Modified: 22.5.1996 / 13:08:40 / cg"
 !
 
 restored
@@ -1072,6 +1074,6 @@
 !Font class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.43 1996-05-20 08:48:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.44 1996-05-22 11:25:46 cg Exp $'
 ! !
 Font initialize!