class: DeviceGraphicsContext
authorStefan Vogel <sv@exept.de>
Tue, 28 Jan 2014 17:00:49 +0100
changeset 6210 af0bf039ec07
parent 6209 4c5466b7a3e0
child 6211 3422768679cd
class: DeviceGraphicsContext changed: #displayDeviceOpaqueString:from:to:in:x:y: #displayDeviceString:from:to:in:x:y: #displayString:from:to:x:y:opaque: fix non-integer points for alienFonts (XftFontFontDescription)
DeviceGraphicsContext.st
--- a/DeviceGraphicsContext.st	Mon Jan 27 22:54:38 2014 +0100
+++ b/DeviceGraphicsContext.st	Tue Jan 28 17:00:49 2014 +0100
@@ -1711,7 +1711,7 @@
          hook for alien fonts
          that 'font' should know how to display the string...
         "
-        font displayString:aString from:index1 to:index2 x:x y:y in:self opaque:opaque.
+        font displayString:aString from:index1 to:index2 x:x rounded y:y rounded in:self opaque:opaque.
         ^ self
     ].
 
@@ -2819,12 +2819,16 @@
         aString displayOpaqueOn:self x:x y:y from:index1 to:index2.
         ^ self
     ].
+
+    pX := x rounded.
+    pY := y rounded.
+
     font isAlienFont ifTrue:[
         "
          hook for alien fonts
          that 'font' should know how to display the string ...
         "
-        font displayOpaqueString:s from:index1 to:index2 x:x y:y in:self.
+        font displayOpaqueString:aString from:index1 to:index2 x:pX y:pY in:self.
         ^ self
     ].
 
@@ -2832,8 +2836,6 @@
         self initGC
     ].
 
-    pX := x rounded.
-    pY := y rounded.
 
     s := aString.
     fontUsed := font onDevice:device.
@@ -3110,12 +3112,16 @@
     or:[aString isText]) ifTrue:[
         ^ aString displayOn:self x:x y:y from:index1 to:index2
     ].
+
+    pX := x rounded.
+    pY := y rounded.
+
     font isAlienFont ifTrue:[
         "
          hook for alien fonts
          that 'font' should know how to display the string ...
         "
-        font displayOpaqueString:s from:index1 to:index2 x:x y:y in:self.
+        font displayOpaqueString:aString from:index1 to:index2 x:pX y:pY in:self.
         ^ self
     ].
 
@@ -3123,9 +3129,6 @@
         self initGC
     ].
 
-    pX := x rounded.
-    pY := y rounded.
-
     s := aString.
     fontUsed := font onDevice:device.
     fontsEncoding := fontUsed encoding.
@@ -3819,11 +3822,11 @@
 !DeviceGraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.126 2013-07-26 15:38:47 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.127 2014-01-28 16:00:49 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.126 2013-07-26 15:38:47 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.127 2014-01-28 16:00:49 stefan Exp $'
 ! !