Xojo Conferences
XDCMay2019MiamiUSA

[MBS] ATSUI prints first string ;-) (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] 4.0dr6
Next thread: [MBS] [MBS]Crash when ProcessMBS.SameAs(nil)


Re: [MBS] MIDI Destinations and External Devices   -   Ron Benditt
  [MBS] ATSUI prints first string ;-)   -   Christian Schmitz

[MBS] ATSUI prints first string ;-)
Date: 29.01.04 15:41 (Thu, 29 Jan 2004 15:41:39 +0100)
From: Christian Schmitz
Hi,

for ATS, I got the first thing to work:

// inside the paint event of a window:

dim s as ATSUStyleMBS
dim t as ATSUTextLayoutMBS
dim a as string
dim cg as CGContextMBS

const kATSUFromTextBeginning=-1
const kATSUToTextEnd=-1

cg=self.CGContextMBS

a="Hello World!"
aÀnvertEncoding(a,Encodings.UTF16)

s=new ATSUStyleMBS
s.Create

t=new ATSUTextLayoutMBS
t.Create
t.SetTextPointerLocation
a,kATSUFromTextBeginning,kATSUToTextEnd,len(a)
t.SetRunStyle s,kATSUFromTextBeginning, kATSUToTextEnd
t.SetCGContext cg.Handle
t.DrawText kATSUFromTextBeginning, kATSUToTextEnd,100,100

You can try with 4.0dr6 later today.

Mfg
Christian

-