JavaNativeMethodImpl_OpenJDK6.st
branchcvs_MAIN
changeset 3716 7bf2eab6e397
parent 3684 f420fbef8898
child 3896 0467a3e7cc0f
equal deleted inserted replaced
3714:73eaf955ca93 3716:7bf2eab6e397
  4846 _WFontMetrics_getMFCharSegmentWidth: nativeContext
  4846 _WFontMetrics_getMFCharSegmentWidth: nativeContext
  4847     "get multi-font string-segment width.
  4847     "get multi-font string-segment width.
  4848      Not yet supported - use standard strings width"
  4848      Not yet supported - use standard strings width"
  4849 
  4849 
  4850     |jMetrics jFont jFontDescr stFont w
  4850     |jMetrics jFont jFontDescr stFont w
  4851      bool1 cp offs lenght bp int1|
  4851      bool1 cp offs length bp int1|
  4852 
  4852 
  4853     jMetrics := nativeContext receiver.
  4853     jMetrics := nativeContext receiver.
  4854     jFont := nativeContext argAt:1.
  4854     jFont := nativeContext argAt:1.
  4855     jFontDescr := nativeContext argAt:2.
  4855     jFontDescr := nativeContext argAt:2.
  4856     bool1 := nativeContext argAt:3.
  4856     bool1 := nativeContext argAt:3.
  4857     cp := nativeContext argAt:4.
  4857     cp := nativeContext argAt:4.
  4858     offs := nativeContext argAt:5.
  4858     offs := nativeContext argAt:5.
  4859     lenght := nativeContext argAt:6.
  4859     length := nativeContext argAt:6.
  4860     bp := nativeContext argAt:7.
  4860     bp := nativeContext argAt:7.
  4861     int1 := nativeContext argAt:8.
  4861     int1 := nativeContext argAt:8.
  4862 
  4862 
  4863     stFont := jFont instVarNamed:'pData'.
  4863     stFont := jFont instVarNamed:'pData'.
  4864     (stFont isNil or:[stFont == 0]) ifTrue:[
  4864     (stFont isNil or:[stFont == 0]) ifTrue:[
  4867 
  4867 
  4868     stFont device isNil ifTrue:[
  4868     stFont device isNil ifTrue:[
  4869         stFont := stFont on:Display.
  4869         stFont := stFont on:Display.
  4870         jFont instVarNamed:'pData' put:stFont.
  4870         jFont instVarNamed:'pData' put:stFont.
  4871     ].
  4871     ].
  4872     w := stFont widthOf:cp from:offs+1 to:offs+lenght.
  4872     w := stFont widthOf:cp from:offs+1 to:offs+length.
  4873     ^ w.
  4873     ^ w.
  4874 
  4874 
  4875     "Created: / 5.1.1998 / 01:57:45 / cg"
  4875     "Created: / 5.1.1998 / 01:57:45 / cg"
  4876     "Modified: / 13.1.1998 / 23:44:03 / cg"
  4876     "Modified: / 13.1.1998 / 23:44:03 / cg"
  4877 !
  4877 !
  6732 
  6732 
  6733 _X11FontMetrics_getMFCharSegmentWidth: nativeContext
  6733 _X11FontMetrics_getMFCharSegmentWidth: nativeContext
  6734     "get multi-font string-segment width.
  6734     "get multi-font string-segment width.
  6735      Not yet supported - use standard strings width"
  6735      Not yet supported - use standard strings width"
  6736 
  6736 
  6737     |jMetrics jFont jFontDescr stFont w cp lenght|
  6737     |jMetrics jFont jFontDescr stFont w cp length|
  6738 
  6738 
  6739     jMetrics := nativeContext receiver.
  6739     jMetrics := nativeContext receiver.
  6740     jFont := nativeContext argAt:1.
  6740     jFont := nativeContext argAt:1.
  6741     jFontDescr := nativeContext argAt:2.
  6741     jFontDescr := nativeContext argAt:2.
  6742     cp := nativeContext argAt:3.
  6742     cp := nativeContext argAt:3.
  6743     lenght := nativeContext argAt:4.
  6743     length := nativeContext argAt:4.
  6744 
  6744 
  6745     stFont := jFont instVarNamed:'pData'.
  6745     stFont := jFont instVarNamed:'pData'.
  6746     (stFont isNil or:[stFont == 0]) ifTrue:[
  6746     (stFont isNil or:[stFont == 0]) ifTrue:[
  6747         self halt
  6747         self halt
  6748     ].
  6748     ].
  6749 
  6749 
  6750     stFont device isNil ifTrue:[
  6750     stFont device isNil ifTrue:[
  6751         stFont := stFont on:Display.
  6751         stFont := stFont on:Display.
  6752         jFont instVarNamed:'pData' put:stFont.
  6752         jFont instVarNamed:'pData' put:stFont.
  6753     ].
  6753     ].
  6754     w := stFont widthOf:cp from:1 to:lenght.
  6754     w := stFont widthOf:cp from:1 to:length.
  6755     ^ w.
  6755     ^ w.
  6756 !
  6756 !
  6757 
  6757 
  6758 _X11FontMetrics_init: nativeContext
  6758 _X11FontMetrics_init: nativeContext
  6759     ^ self _WFontMetrics_init: nativeContext
  6759     ^ self _WFontMetrics_init: nativeContext