#REFACTORING
authorStefan Vogel <sv@exept.de>
Fri, 13 Nov 2015 12:00:48 +0100
changeset 7061 bdace6fb405f
parent 7060 e7ecabecd7e2
child 7062 21b62a5d9b98
#REFACTORING class: XftFontDescription changed: #displayString:from:to:x:y:in:opaque:
XftFontDescription.st
--- a/XftFontDescription.st	Fri Nov 13 12:00:15 2015 +0100
+++ b/XftFontDescription.st	Fri Nov 13 12:00:48 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "{ Package: 'stx:libview' }"
 
 "{ NameSpace: Smalltalk }"
@@ -616,7 +614,7 @@
     "display a partial string at some position in aGC."
 
     |index2 bytesPerCharacter transformation
-     clipOrg clipCorn clipRect clipCX clipCY clipX clipY clipW clipH clipPnt
+     clipOrg clipCorn clipRect clipX clipY clipW clipH clipPnt
      fg fgR fgG fgB fgA fgPixel bg bgR bgG bgB bgA bgPixel
      drawX drawY drawPnt displayId screen drawableId error stringLen 
      newXftDrawId newDrawableAssociation|
@@ -630,31 +628,16 @@
         index2 := index2Arg.
     ].
     bytesPerCharacter := aString bitsPerCharacter // 8.
-    transformation := aGC transformation.
 
-    clipRect := aGC clippingBoundsOrNil.
-    
+    clipRect := aGC deviceClippingRectangle.
     clipRect notNil ifTrue:[
         clipX := clipRect left.
         clipY := clipRect top.
-        clipCX := clipRect right.
-        clipCY := clipRect bottom.
-        "/ YES YES YES: this MUST be transformed!!
-        "/ (see htmlView) fix the notebook, please.
-        transformation notNil ifTrue:[
-            clipOrg := transformation transformPoint:(clipRect origin).
-            clipCorn := transformation transformPoint:(clipRect corner).
-            clipX := clipOrg x ceiling.
-            clipY := clipOrg y ceiling.
-            clipCX := clipCorn x ceiling.
-            clipCY := clipCorn y ceiling.
-"/            clipX := (transformation applyToX:clipPnt x) ceiling.
-"/            clipY := (transformation applyToY:clipY) ceiling.
-        ].
-        clipW := clipCX-clipX.
-        clipH := clipCY-clipY.
+        clipW := clipRect width.
+        clipH := clipRect height.
     ].
 
+    transformation := aGC transformation.
     transformation isNil ifTrue:[
         drawX := xArg.
         drawY := yArg.
@@ -662,8 +645,6 @@
         drawPnt := transformation transformPoint:(xArg @ yArg).
         drawX := drawPnt x ceiling.
         drawY := drawPnt y ceiling.
-"/        drawX := (transformation applyToX:xArg) ceiling.
-"/        drawY := (transformation applyToY:yArg) ceiling.
     ].
 
     fg  :=  aGC paint.