Text.st
changeset 963 0d5ef474ea17
parent 954 198756c1e030
child 975 4a2048f291eb
--- a/Text.st	Fri Feb 16 16:30:54 2001 +0100
+++ b/Text.st	Fri Feb 16 21:26:50 2001 +0100
@@ -14,10 +14,10 @@
 "{ Package: 'stx:libbasic2' }"
 
 CharacterArray subclass:#Text
-        instanceVariableNames:'string runs'
-        classVariableNames:''
-        poolDictionaries:''
-        category:'Collections-Text'
+	instanceVariableNames:'string runs'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Collections-Text'
 !
 
 !Text class methodsFor:'documentation'!
@@ -650,7 +650,7 @@
 
 !Text methodsFor:'displaying'!
 
-displayOn:aGC x:x0 y:y opaque:opaque
+displayOn:aGC x:x0 y:y opaque:opaqueWanted
     "display the receiver on a GC"
 
     |savedFont savedPaint savedBgPaint font color boldFont italicFont boldItalicFont 
@@ -660,12 +660,13 @@
      endPos "{ Class: SmallInteger }"
      x      
      l      "{ Class: SmallInteger }"
-     yL k value device|
+     yL k value device opaque|
 
     savedFont := aGC basicFont.
     savedPaint := aGC paint.
     savedBgPaint := aGC backgroundPaint.
 
+    opaque := opaqueWanted.
     device := aGC graphicsDevice.
 
     pos := 1.
@@ -698,6 +699,7 @@
                     ] ifFalse:[k == #backgroundColor ifTrue:[
                         bgPaint := value onDevice:device.
                         emphasis value:bgPaint.
+                        opaque := true.
                     ] ifFalse:[k == #underlineColor ifTrue:[
                         ulPaint := value onDevice:device.
                         emphasis value:ulPaint.
@@ -730,6 +732,7 @@
                                     ] ifFalse:[k == #backgroundColor ifTrue:[
                                         bgPaint := value onDevice:device.
                                         entry value:bgPaint.
+                                        opaque := true.
                                     ] ifFalse:[k == #underlineColor ifTrue:[
                                         ulPaint := value onDevice:device.
                                         entry value:ulPaint.
@@ -770,7 +773,8 @@
         font := font onDevice:device.
         aGC basicFont:font.
         reverse ifTrue:[
-            aGC paint:bgPaint on:color
+            aGC paint:bgPaint on:color.
+            opaque := true.
         ] ifFalse:[
             aGC paint:color on:bgPaint.
         ].
@@ -1331,6 +1335,6 @@
 !Text class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.71 2001-01-25 14:32:31 ps Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.72 2001-02-16 20:26:50 cg Exp $'
 ! !
 Text initialize!