added #clippingRectangleOrNil for ST-80 compatibility
authorClaus Gittinger <cg@exept.de>
Sat, 13 Apr 1996 20:06:18 +0200
changeset 561 3c1ec7798f77
parent 560 968d062c79cb
child 562 e596664fb767
added #clippingRectangleOrNil for ST-80 compatibility
DevDraw.st
GC.st
GraphicsContext.st
--- a/DevDraw.st	Fri Apr 12 19:06:48 1996 +0200
+++ b/DevDraw.st	Sat Apr 13 20:06:18 1996 +0200
@@ -253,18 +253,21 @@
 !
 
 clipRect
-    "return the clipping rectangle for drawing"
+    "return the clipping rectangle for drawing. If there is currently no clipRect,
+     a dummy is created."
 
     |rect|
 
     clipRect isNil ifTrue:[
-	rect := 0@0 extent:width@height.
-	transformation notNil ifTrue:[
-	    rect := transformation applyInverseTo:rect.
-	].
-	^ rect
+        rect := 0@0 extent:width@height.
+        transformation notNil ifTrue:[
+            rect := transformation applyInverseTo:rect.
+        ].
+        ^ rect
     ].
     ^ clipRect
+
+    "Modified: 10.4.1996 / 14:32:22 / cg"
 !
 
 clipRect:aRectangle
@@ -314,6 +317,14 @@
     clipRect := aRectangle
 !
 
+clippingRectangleOrNil
+    "return the clipping rectangle for drawing, nil if there is none."
+
+    ^ clipRect
+
+    "Created: 10.4.1996 / 14:32:02 / cg"
+!
+
 device
     "return the device, the receiver is associated with"
 
@@ -2930,6 +2941,6 @@
 !DeviceDrawable class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/DevDraw.st,v 1.39 1996-03-21 17:58:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/DevDraw.st,v 1.40 1996-04-13 18:06:18 cg Exp $'
 ! !
 DeviceDrawable initialize!
--- a/GC.st	Fri Apr 12 19:06:48 1996 +0200
+++ b/GC.st	Sat Apr 13 20:06:18 1996 +0200
@@ -290,6 +290,12 @@
     ^ self clipRect
 !
 
+clippingRectangleOrNil
+    ^ self subclassResponsibility
+
+    "Created: 10.4.1996 / 14:31:19 / cg"
+!
+
 font
     "return the current drawing font"
 
@@ -837,6 +843,6 @@
 !GraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/GC.st,v 1.23 1996-03-07 18:38:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/GC.st,v 1.24 1996-04-13 18:05:20 cg Exp $'
 ! !
 GraphicsContext initialize!
--- a/GraphicsContext.st	Fri Apr 12 19:06:48 1996 +0200
+++ b/GraphicsContext.st	Sat Apr 13 20:06:18 1996 +0200
@@ -290,6 +290,12 @@
     ^ self clipRect
 !
 
+clippingRectangleOrNil
+    ^ self subclassResponsibility
+
+    "Created: 10.4.1996 / 14:31:19 / cg"
+!
+
 font
     "return the current drawing font"
 
@@ -837,6 +843,6 @@
 !GraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.23 1996-03-07 18:38:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.24 1996-04-13 18:05:20 cg Exp $'
 ! !
 GraphicsContext initialize!