Revision 23839a6cb5c6ce1890674b83787f024bfdbf0c83 authored by Sergey Linev on 03 March 2015, 16:23:43 UTC, committed by Bertrand Bellenot on 04 March 2015, 08:35:14 UTC
1. Introduce central method where all kind of text drawings are handled. At this place decide which kind of rendering - plain text, simplify latex or normal MathJax is used 2. Implement correct size adjustment and alignment for all kinds of text output (with and without MathJax) 3. Support TMathText class - always MathJax will be used 4. Draw label in TPabeText 5. Avoid concurent calls of JSROOT.AssertPrerequisities Signed-off-by: Bertrand Bellenot <bertrand.bellenot@cern.ch>
1 parent 3cb3124
t1203.cxx
/* -*- C++ -*- */
/*************************************************************************
* Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch)
*
* For the licensing terms see the file COPYING
*
************************************************************************/
#include <iostream>
using namespace std;
typedef double Double_t;
typedef int Int_t;
Int_t nrows = 6;
Int_t ncols = 4;
Double_t **table = 0;
Int_t cut = 3;
//______________________________________________________________________
void init() {
// Create table
table = new Double_t*[nrows];
for (Int_t i=0; i<nrows; i++) {
table[i] = 0;
table[i] = new Double_t[ncols];
}//for_i
// Fill table
for (Int_t i=0; i<nrows; i++) {
for (Int_t k=0; k<ncols; k++) {
table[i][k] = (k==ncols-1) ? i : (k+1)*1.1;
// table[i][k] = i;
}//for_k
}//for_i
}
void doit() {
// Export table
for (Int_t i=0; i<nrows; i++) {
if (cut > 0 && (Int_t)(table[i][ncols-1]) < cut) continue;
for (Int_t k=0; k<ncols; k++) {
//G__dispvalue(stderr,table[i][k]);
cout << " " << table[i][k];
}//for_k
cout << endl;
}//for_i
}
void clear() {
for (Int_t i=0; i<nrows; i++) {
if (table[i]) {delete [] table[i]; table[i] = 0;}
}//for_i
if (table) delete [] table;
}//TestTable
int main() {
init();
doit();
clear();
return 0;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...