--- a/GraphicsContext.st Fri Mar 05 13:47:04 2004 +0100
+++ b/GraphicsContext.st Fri Mar 05 15:27:22 2004 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
@@ -709,6 +711,34 @@
"Modified: 12.5.1996 / 22:24:30 / cg"
!
+characterEncoding
+ "returns a symbol describing how the contents is encoded internally.
+ For now, this should be the same encoding as my fonts encoding (otherwise, mappings would
+ occur when drawing).
+ This is (currently) only passed down from the fileBrowser,
+ and required when japanese/chinese/korean text is edited.
+ (encoding is something like #'iso8859-5' #euc, #sjis, #jis7, #gb, #big5 or #ksc)"
+
+ ^ characterEncoding
+!
+
+characterEncoding:encodingArg
+ "define how the contents is encoded internally.
+ This should normally never be required, as ST/X now assumes
+ unicode (of which iso8859-1 is a subset) encoding.
+ The possibility to change the characterEncoding is provided as
+ a backward compatibility hook for programs which want to use
+ another encoding internally. One such view is the CharacterSetView,
+ which wants to show character as they are actually present in a font."
+
+ |encodingSymOrNil|
+
+ encodingSymOrNil := encodingArg isNil ifTrue:[#'iso10646-1'] ifFalse:[encodingArg asSymbol].
+ characterEncoding ~~ encodingSymOrNil ifTrue:[
+ characterEncoding := encodingSymOrNil.
+ ].
+!
+
clipRect
"return the clip-rectangle for drawing.
If there is currently no active clip, return the underlying
@@ -2252,7 +2282,7 @@
!GraphicsContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.100 2004-02-28 12:58:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.101 2004-03-05 14:27:22 cg Exp $'
! !
GraphicsContext initialize!