Hi,
I suspected it might be related to the different output engines.
My data objects generate multiline debug reports which I like to be able to
dump to stdout or to a Pavetext (the reports are just (char*)s). So, if any
are interested, the following dumb little kludge will break strings on '\n'
characters and call AddText multiple times to get new lines without having
to delve into the mysteries of the display systems. Seems to work OK for
me.
Int_t TPaveText::AddLines(const Text_t *inbuf)
{
// Adds single or multiple lines to this PaveText, breaking on '\n'
characters
// returns the number of lines printed
//
Int_t insize = strlen(inbuf);
Int_t cnt = 0;
Int_t linecount = 1;
const Int_t linesize = 255;
Text_t outline[linesize];
for(Int_t n=0;n<insize;n++){
if(inbuf[n] != '\n'){
sprintf((outline + cnt++),"%c",inbuf[n]);
if(cnt == linesize){ //break after linesize characters
linecount++;
cnt = 0;
AddText(outline);
sprintf(outline,"");
}
} else { //break on newline character
linecount++;
cnt = 0;
pt->AddText(outline);
sprintf(outline,"");
}
}
AddText(outline); //print what is left in outline
return linecount;
}