GraphicsContext.st
changeset 2460 a1c5c2053f42
parent 2436 4ef8d33c8951
child 2747 04c41d416186
--- a/GraphicsContext.st	Wed Feb 17 21:09:40 1999 +0100
+++ b/GraphicsContext.st	Wed Feb 17 23:39:10 1999 +0100
@@ -1575,6 +1575,16 @@
     self displayString:aString x:aPoint x y:aPoint y
 !
 
+displayString:aString centeredAtX:x y:y
+    "draw a string - drawing fg only"
+
+    |w h|
+
+    w := aString widthOn:self.
+    h := aString heightOn:self.
+    self displayString:aString x:x-(w/2) y:y-(h/2)
+!
+
 displayString:aString from:start to:stop at:aPoint
     "draw part of a string - drawing fg only"
 
@@ -2117,6 +2127,6 @@
 !GraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.72 1999-02-04 15:37:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.73 1999-02-17 22:39:10 cg Exp $'
 ! !
 GraphicsContext initialize!