*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 15 Aug 1996 19:23:47 +0200
changeset 1033 b5cd84ed805f
parent 1032 e51688055c9e
child 1034 5f6f417dcb12
*** empty log message ***
DevGC.st
DeviceGraphicsContext.st
--- a/DevGC.st	Thu Aug 15 18:47:08 1996 +0200
+++ b/DevGC.st	Thu Aug 15 19:23:47 1996 +0200
@@ -496,7 +496,7 @@
 	    (mask == nil) ifTrue:[
 		device setBitmapMask:nil in:gcId
 	    ] ifFalse:[
-		mask := mask on:device.
+		mask := mask asFormOn:device.
 		id := mask id.
 		(mask depth == 1) ifTrue:[
 		    device setBitmapMask:id in:gcId
@@ -852,7 +852,7 @@
     |deviceDrawable id srcGCId|
 
     aDrawable graphicsDevice ~~ device ifTrue:[
-	deviceDrawable := aDrawable on:device.
+	deviceDrawable := aDrawable asFormOn:device.
     ] ifFalse:[
 	deviceDrawable := aDrawable
     ].
@@ -879,11 +879,10 @@
     ((deviceDrawable depth == 1) and:[device depth ~~ 1]) ifTrue:[
 	device
 	    copyPlaneFromId:id
-		     x:srcX y:srcY
+		     x:srcX y:srcY gc:srcGCId
 		    to:drawableId
-		     x:dstX y:dstY
+		     x:dstX y:dstY gc:gcId
 		 width:w height:h
-		    gc:gcId
     ] ifFalse:[
 	device
 	    copyFromId:id
@@ -906,7 +905,7 @@
     |deviceDrawable id srcGCId|
 
     aDrawable graphicsDevice ~~ device ifTrue:[
-	deviceDrawable := aDrawable on:device.
+	deviceDrawable := aDrawable asFormOn:device.
     ] ifFalse:[
 	deviceDrawable := aDrawable
     ].
@@ -930,11 +929,10 @@
 
     device
 	copyPlaneFromId:id
-		 x:srcX y:srcY
+		 x:srcX y:srcY gc:(deviceDrawable gcId)
 		to:drawableId
-		 x:dstX y:dstY
+		 x:dstX y:dstY gc:gcId
 	     width:w height:h
-		gc:gcId
 
     "Modified: 15.6.1996 / 15:36:42 / cg"
 ! !
@@ -1866,7 +1864,7 @@
 
     |id w h easy paintDither tmpForm 
      fgId noColor allColor allBits pX pY
-     mask maskId deviceForm|
+     mask maskId deviceForm deviceMask|
 
     w := aForm width.
     h := aForm height.
@@ -1875,7 +1873,7 @@
     pY := y rounded.
 
     aForm graphicsDevice ~~ device ifTrue:[
-	deviceForm := aForm on:device
+	deviceForm := aForm asFormOn:device
     ] ifFalse:[
 	deviceForm := aForm
     ].
@@ -1883,7 +1881,7 @@
     id := deviceForm id.
 
     id isNil ifTrue:[
-	deviceForm := aForm on:device.
+	deviceForm := aForm asFormOn:device.
 	id := deviceForm id.
 	id isNil ifTrue:[
 	    'DEVGC: invalid form draw - ignored' errorPrintNL.
@@ -1902,7 +1900,8 @@
 	    mask depth == 1 ifFalse:[
 		'DEVGC: alpha channel not yet supported' errorPrintCR.
 	    ] ifTrue:[
-		maskId := (mask on:device) id.
+		deviceMask := mask asFormOn:device.
+		maskId := deviceMask id.
 		maskId notNil ifTrue:[
 		    "
 		     create temp-form;
@@ -1930,11 +1929,10 @@
 		    device setFunction:#and in:tmpForm gcId.
 		    device
 			copyPlaneFromId:maskId
-				      x:0 y:0
+				      x:0 y:0 gc:(deviceMask gcId)
 				     to:tmpForm id
-				      x:0 y:0
-				  width:w height:h
-				     gc:tmpForm gcId.
+				      x:0 y:0 gc:tmpForm gcId
+				  width:w height:h.
 
 
 		    "
@@ -1944,11 +1942,10 @@
 		    device setFunction:#and in:gcId.
 		    device
 			copyPlaneFromId:maskId
-				      x:0 y:0
+				      x:0 y:0 gc:(deviceMask gcId)
 				     to:drawableId
-				      x:pX y:pY
-				  width:w height:h
-				     gc:gcId.
+				      x:pX y:pY gc:gcId
+				  width:w height:h.
     "/ Delay waitForSeconds:3.
 		    "
 		     or-in tempform-bits ...
@@ -2028,11 +2025,10 @@
 	    device setFunction:#and in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
-			  width:w height:h
-			     gc:gcId.
+			      x:pX y:pY gc:gcId
+			  width:w height:h.
 	].
 
 	fgId ~~ 0 ifTrue:[
@@ -2043,11 +2039,10 @@
 	    device setFunction:#or in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 	"
 	 flush foreground/background cache
@@ -2087,11 +2082,10 @@
     device setFunction:#and in:gcId.
     device
 	copyPlaneFromId:id
-		      x:0 y:0
+		      x:0 y:0 gc:(deviceForm gcId)
 		     to:drawableId
-		      x:pX y:pY
-		  width:w height:h
-		     gc:gcId.
+		      x:pX y:pY gc:gcId
+		  width:w height:h.
     "
      or-in temp into destination
     "
@@ -2145,18 +2139,13 @@
     pX := x rounded.
     pY := y rounded.
 
-    aForm graphicsDevice ~~ device ifTrue:[
-	deviceForm := aForm on:device
-    ] ifFalse:[
-	deviceForm := aForm
-    ].
-
+    deviceForm := aForm asFormOn:device.
     id := deviceForm id.
 
     "temporary ..."
     (id isNil 
     or:[aForm graphicsDevice ~~ device]) ifTrue:[
-	deviceForm := deviceForm on:device.
+	deviceForm := deviceForm asFormOn:device.
 	id := deviceForm id.
 	id isNil ifTrue:[
 	    'DEVGC: invalid form draw - ignored' errorPrintNL.
@@ -2227,11 +2216,10 @@
 	].
 	device
 	    copyPlaneFromId:id
-			  x:0 y:0
+			  x:0 y:0 gc:(deviceForm gcId)
 			 to:drawableId
-			  x:pX y:pY 
-		      width:w height:h
-			 gc:gcId.
+			  x:pX y:pY gc:gcId
+		      width:w height:h.
 	^ self
     ].
 
@@ -2264,11 +2252,10 @@
 	    device setFunction:#and in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 
 	fgId ~~ 0 ifTrue:[
@@ -2279,11 +2266,10 @@
 	    device setFunction:#or in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 	"
 	 flush foreground/background cache
@@ -2313,11 +2299,10 @@
 	    device setFunction:#and in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 
 	"
@@ -2328,11 +2313,10 @@
 	    device setFunction:#or in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY 
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 	"
 	 flush foreground/background cache
@@ -3408,6 +3392,6 @@
 !DeviceGraphicsContext  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/DevGC.st,v 1.16 1996-08-15 16:28:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/DevGC.st,v 1.17 1996-08-15 17:23:47 cg Exp $'
 ! !
 DeviceGraphicsContext initialize!
--- a/DeviceGraphicsContext.st	Thu Aug 15 18:47:08 1996 +0200
+++ b/DeviceGraphicsContext.st	Thu Aug 15 19:23:47 1996 +0200
@@ -496,7 +496,7 @@
 	    (mask == nil) ifTrue:[
 		device setBitmapMask:nil in:gcId
 	    ] ifFalse:[
-		mask := mask on:device.
+		mask := mask asFormOn:device.
 		id := mask id.
 		(mask depth == 1) ifTrue:[
 		    device setBitmapMask:id in:gcId
@@ -852,7 +852,7 @@
     |deviceDrawable id srcGCId|
 
     aDrawable graphicsDevice ~~ device ifTrue:[
-	deviceDrawable := aDrawable on:device.
+	deviceDrawable := aDrawable asFormOn:device.
     ] ifFalse:[
 	deviceDrawable := aDrawable
     ].
@@ -879,11 +879,10 @@
     ((deviceDrawable depth == 1) and:[device depth ~~ 1]) ifTrue:[
 	device
 	    copyPlaneFromId:id
-		     x:srcX y:srcY
+		     x:srcX y:srcY gc:srcGCId
 		    to:drawableId
-		     x:dstX y:dstY
+		     x:dstX y:dstY gc:gcId
 		 width:w height:h
-		    gc:gcId
     ] ifFalse:[
 	device
 	    copyFromId:id
@@ -906,7 +905,7 @@
     |deviceDrawable id srcGCId|
 
     aDrawable graphicsDevice ~~ device ifTrue:[
-	deviceDrawable := aDrawable on:device.
+	deviceDrawable := aDrawable asFormOn:device.
     ] ifFalse:[
 	deviceDrawable := aDrawable
     ].
@@ -930,11 +929,10 @@
 
     device
 	copyPlaneFromId:id
-		 x:srcX y:srcY
+		 x:srcX y:srcY gc:(deviceDrawable gcId)
 		to:drawableId
-		 x:dstX y:dstY
+		 x:dstX y:dstY gc:gcId
 	     width:w height:h
-		gc:gcId
 
     "Modified: 15.6.1996 / 15:36:42 / cg"
 ! !
@@ -1866,7 +1864,7 @@
 
     |id w h easy paintDither tmpForm 
      fgId noColor allColor allBits pX pY
-     mask maskId deviceForm|
+     mask maskId deviceForm deviceMask|
 
     w := aForm width.
     h := aForm height.
@@ -1875,7 +1873,7 @@
     pY := y rounded.
 
     aForm graphicsDevice ~~ device ifTrue:[
-	deviceForm := aForm on:device
+	deviceForm := aForm asFormOn:device
     ] ifFalse:[
 	deviceForm := aForm
     ].
@@ -1883,7 +1881,7 @@
     id := deviceForm id.
 
     id isNil ifTrue:[
-	deviceForm := aForm on:device.
+	deviceForm := aForm asFormOn:device.
 	id := deviceForm id.
 	id isNil ifTrue:[
 	    'DEVGC: invalid form draw - ignored' errorPrintNL.
@@ -1902,7 +1900,8 @@
 	    mask depth == 1 ifFalse:[
 		'DEVGC: alpha channel not yet supported' errorPrintCR.
 	    ] ifTrue:[
-		maskId := (mask on:device) id.
+		deviceMask := mask asFormOn:device.
+		maskId := deviceMask id.
 		maskId notNil ifTrue:[
 		    "
 		     create temp-form;
@@ -1930,11 +1929,10 @@
 		    device setFunction:#and in:tmpForm gcId.
 		    device
 			copyPlaneFromId:maskId
-				      x:0 y:0
+				      x:0 y:0 gc:(deviceMask gcId)
 				     to:tmpForm id
-				      x:0 y:0
-				  width:w height:h
-				     gc:tmpForm gcId.
+				      x:0 y:0 gc:tmpForm gcId
+				  width:w height:h.
 
 
 		    "
@@ -1944,11 +1942,10 @@
 		    device setFunction:#and in:gcId.
 		    device
 			copyPlaneFromId:maskId
-				      x:0 y:0
+				      x:0 y:0 gc:(deviceMask gcId)
 				     to:drawableId
-				      x:pX y:pY
-				  width:w height:h
-				     gc:gcId.
+				      x:pX y:pY gc:gcId
+				  width:w height:h.
     "/ Delay waitForSeconds:3.
 		    "
 		     or-in tempform-bits ...
@@ -2028,11 +2025,10 @@
 	    device setFunction:#and in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
-			  width:w height:h
-			     gc:gcId.
+			      x:pX y:pY gc:gcId
+			  width:w height:h.
 	].
 
 	fgId ~~ 0 ifTrue:[
@@ -2043,11 +2039,10 @@
 	    device setFunction:#or in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 	"
 	 flush foreground/background cache
@@ -2087,11 +2082,10 @@
     device setFunction:#and in:gcId.
     device
 	copyPlaneFromId:id
-		      x:0 y:0
+		      x:0 y:0 gc:(deviceForm gcId)
 		     to:drawableId
-		      x:pX y:pY
-		  width:w height:h
-		     gc:gcId.
+		      x:pX y:pY gc:gcId
+		  width:w height:h.
     "
      or-in temp into destination
     "
@@ -2145,18 +2139,13 @@
     pX := x rounded.
     pY := y rounded.
 
-    aForm graphicsDevice ~~ device ifTrue:[
-	deviceForm := aForm on:device
-    ] ifFalse:[
-	deviceForm := aForm
-    ].
-
+    deviceForm := aForm asFormOn:device.
     id := deviceForm id.
 
     "temporary ..."
     (id isNil 
     or:[aForm graphicsDevice ~~ device]) ifTrue:[
-	deviceForm := deviceForm on:device.
+	deviceForm := deviceForm asFormOn:device.
 	id := deviceForm id.
 	id isNil ifTrue:[
 	    'DEVGC: invalid form draw - ignored' errorPrintNL.
@@ -2227,11 +2216,10 @@
 	].
 	device
 	    copyPlaneFromId:id
-			  x:0 y:0
+			  x:0 y:0 gc:(deviceForm gcId)
 			 to:drawableId
-			  x:pX y:pY 
-		      width:w height:h
-			 gc:gcId.
+			  x:pX y:pY gc:gcId
+		      width:w height:h.
 	^ self
     ].
 
@@ -2264,11 +2252,10 @@
 	    device setFunction:#and in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 
 	fgId ~~ 0 ifTrue:[
@@ -2279,11 +2266,10 @@
 	    device setFunction:#or in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 	"
 	 flush foreground/background cache
@@ -2313,11 +2299,10 @@
 	    device setFunction:#and in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 
 	"
@@ -2328,11 +2313,10 @@
 	    device setFunction:#or in:gcId.
 	    device
 		copyPlaneFromId:id
-			      x:0 y:0
+			      x:0 y:0 gc:(deviceForm gcId)
 			     to:drawableId
-			      x:pX y:pY 
+			      x:pX y:pY gc:gcId
 			  width:w height:h
-			     gc:gcId.
 	].
 	"
 	 flush foreground/background cache
@@ -3408,6 +3392,6 @@
 !DeviceGraphicsContext  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.16 1996-08-15 16:28:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.17 1996-08-15 17:23:47 cg Exp $'
 ! !
 DeviceGraphicsContext initialize!