BitmapFont.st
changeset 3663 d40999d6cd1e
parent 3659 26bd2ef5f0ed
child 3664 85de01ef2853
--- a/BitmapFont.st	Tue Jul 23 21:40:47 2002 +0200
+++ b/BitmapFont.st	Tue Jul 23 22:33:41 2002 +0200
@@ -377,20 +377,7 @@
 
 !BitmapFont methodsFor:'drawing'!
 
-displayOpaqueString:aString from:index1 to:index2 x:x0 y:y in:aGC
-    "required protocol for new fonts:
-     - display part of a string, drawing both fore- and background pixels"
-
-    |x|
-
-    x := x0.
-    index1 to:index2 do:[:index |
-        self drawCharacter:(aString at:index) asciiValue in:aGC x:x y:y opaque:true.
-        x := x + (self widthOfCharacter:(aString at:index) asciiValue)
-    ]
-!
-
-displayString:aString from:index1 to:index2 x:x0 y:y in:aGC
+displayString:aString from:index1 to:index2 x:x0 y:y in:aGC opaque:opaque
     "required protocol for new fonts:
      - display part of a string, drawing foreground pixels only"
 
@@ -398,7 +385,7 @@
 
     x := x0.
     index1 to:index2 do:[:index |
-        self drawCharacter:(aString at:index) asciiValue in:aGC x:x y:y opaque:false.
+        self drawCharacter:(aString at:index) asciiValue in:aGC x:x y:y opaque:opaque.
         x := x + (self widthOfCharacter:(aString at:index) asciiValue)
     ]
 ! !
@@ -410,11 +397,7 @@
 
     glyph := characterBitmaps at:(ascii + 1) ifAbsent:nil.
     glyph isNil ifTrue:[^ self].
-    opaque ifTrue:[
-        aGC displayOpaqueForm:glyph x:x y:y-ascent
-    ] ifFalse:[
-        aGC displayForm:glyph x:x y:y-ascent
-    ]
+    aGC displayForm:glyph x:x y:y-ascent opaque:opaque
 ! !
 
 !BitmapFont methodsFor:'private - queries'!
@@ -566,5 +549,5 @@
 !BitmapFont class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/BitmapFont.st,v 1.4 2002-07-23 17:22:30 mb Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/BitmapFont.st,v 1.5 2002-07-23 20:31:40 mb Exp $'
 ! !