#REFACTORING
class: XftFontDescription
changed: #displayString:from:to:x:y:in:opaque:
--- 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.