DeviceGraphicsContext.st
changeset 6210 af0bf039ec07
parent 6108 6ecfb89408d2
child 6215 701d3f1f91f7
equal deleted inserted replaced
6209:4c5466b7a3e0 6210:af0bf039ec07
  1709     font isAlienFont ifTrue:[
  1709     font isAlienFont ifTrue:[
  1710         "
  1710         "
  1711          hook for alien fonts
  1711          hook for alien fonts
  1712          that 'font' should know how to display the string...
  1712          that 'font' should know how to display the string...
  1713         "
  1713         "
  1714         font displayString:aString from:index1 to:index2 x:x y:y in:self opaque:opaque.
  1714         font displayString:aString from:index1 to:index2 x:x rounded y:y rounded in:self opaque:opaque.
  1715         ^ self
  1715         ^ self
  1716     ].
  1716     ].
  1717 
  1717 
  1718     gcId isNil ifTrue:[
  1718     gcId isNil ifTrue:[
  1719         self initGC
  1719         self initGC
  2817          that 'thing' should know how to display itself ...
  2817          that 'thing' should know how to display itself ...
  2818         "
  2818         "
  2819         aString displayOpaqueOn:self x:x y:y from:index1 to:index2.
  2819         aString displayOpaqueOn:self x:x y:y from:index1 to:index2.
  2820         ^ self
  2820         ^ self
  2821     ].
  2821     ].
       
  2822 
       
  2823     pX := x rounded.
       
  2824     pY := y rounded.
       
  2825 
  2822     font isAlienFont ifTrue:[
  2826     font isAlienFont ifTrue:[
  2823         "
  2827         "
  2824          hook for alien fonts
  2828          hook for alien fonts
  2825          that 'font' should know how to display the string ...
  2829          that 'font' should know how to display the string ...
  2826         "
  2830         "
  2827         font displayOpaqueString:s from:index1 to:index2 x:x y:y in:self.
  2831         font displayOpaqueString:aString from:index1 to:index2 x:pX y:pY in:self.
  2828         ^ self
  2832         ^ self
  2829     ].
  2833     ].
  2830 
  2834 
  2831     gcId isNil ifTrue:[
  2835     gcId isNil ifTrue:[
  2832         self initGC
  2836         self initGC
  2833     ].
  2837     ].
  2834 
  2838 
  2835     pX := x rounded.
       
  2836     pY := y rounded.
       
  2837 
  2839 
  2838     s := aString.
  2840     s := aString.
  2839     fontUsed := font onDevice:device.
  2841     fontUsed := font onDevice:device.
  2840     fontsEncoding := fontUsed encoding.
  2842     fontsEncoding := fontUsed encoding.
  2841     (characterEncoding ~~ fontsEncoding) ifTrue:[
  2843     (characterEncoding ~~ fontsEncoding) ifTrue:[
  3108     "
  3110     "
  3109     (aString isString not
  3111     (aString isString not
  3110     or:[aString isText]) ifTrue:[
  3112     or:[aString isText]) ifTrue:[
  3111         ^ aString displayOn:self x:x y:y from:index1 to:index2
  3113         ^ aString displayOn:self x:x y:y from:index1 to:index2
  3112     ].
  3114     ].
       
  3115 
       
  3116     pX := x rounded.
       
  3117     pY := y rounded.
       
  3118 
  3113     font isAlienFont ifTrue:[
  3119     font isAlienFont ifTrue:[
  3114         "
  3120         "
  3115          hook for alien fonts
  3121          hook for alien fonts
  3116          that 'font' should know how to display the string ...
  3122          that 'font' should know how to display the string ...
  3117         "
  3123         "
  3118         font displayOpaqueString:s from:index1 to:index2 x:x y:y in:self.
  3124         font displayOpaqueString:aString from:index1 to:index2 x:pX y:pY in:self.
  3119         ^ self
  3125         ^ self
  3120     ].
  3126     ].
  3121 
  3127 
  3122     gcId isNil ifTrue:[
  3128     gcId isNil ifTrue:[
  3123         self initGC
  3129         self initGC
  3124     ].
  3130     ].
  3125 
       
  3126     pX := x rounded.
       
  3127     pY := y rounded.
       
  3128 
  3131 
  3129     s := aString.
  3132     s := aString.
  3130     fontUsed := font onDevice:device.
  3133     fontUsed := font onDevice:device.
  3131     fontsEncoding := fontUsed encoding.
  3134     fontsEncoding := fontUsed encoding.
  3132     (characterEncoding ~~ fontsEncoding) ifTrue:[
  3135     (characterEncoding ~~ fontsEncoding) ifTrue:[
  3817 ! !
  3820 ! !
  3818 
  3821 
  3819 !DeviceGraphicsContext class methodsFor:'documentation'!
  3822 !DeviceGraphicsContext class methodsFor:'documentation'!
  3820 
  3823 
  3821 version
  3824 version
  3822     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.126 2013-07-26 15:38:47 stefan Exp $'
  3825     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.127 2014-01-28 16:00:49 stefan Exp $'
  3823 !
  3826 !
  3824 
  3827 
  3825 version_CVS
  3828 version_CVS
  3826     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.126 2013-07-26 15:38:47 stefan Exp $'
  3829     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.127 2014-01-28 16:00:49 stefan Exp $'
  3827 ! !
  3830 ! !
  3828 
  3831 
  3829 
  3832 
  3830 DeviceGraphicsContext initialize!
  3833 DeviceGraphicsContext initialize!