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
oprovld2.cxx
/* -*- C++ -*- */
/*************************************************************************
* Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch)
*
* For the licensing terms see the file COPYING
*
************************************************************************/
#include <stdio.h>
class complex {
double re,im;
public:
complex(double rein=0.0,double imin=0) { re=rein;im=imin;}
complex& operator+=(complex& a) { re+=a.re; im+=a.im; return(*this);}
complex& operator-=(complex& a) { re-=a.re; im-=a.im; return(*this);}
void disp() { printf("%g %g\n",re,im); }
friend complex operator+(complex& a, complex& b);
friend complex operator-(complex& a, complex& b);
complex& operator++() { re++; return(*this);}
complex& operator++(int i) { im++; return(*this);}
friend complex& operator--(complex& a);
friend complex& operator--(complex& a, int i);
};
complex& operator--(complex& a) { a.re--; return(a);}
complex& operator--(complex& a, int) { a.im--; return(a);}
complex operator+(complex& a, complex& b) {
complex c;
c.re = a.re+b.re;
c.im = a.im+b.im;
return(c);
}
complex operator-(complex& a, complex& b) {
complex c;
c.re = a.re-b.re;
c.im = a.im-b.im;
return(c);
}
int main() {
int i;
complex a(1,2),b(4,5),c;
c.disp();
c += a;
c.disp();
c -= b;
c.disp();
c++;
c.disp();
++c;
c.disp();
c--;
c.disp();
--c;
c.disp();
for(i=0;i<5;i++) {
c += a;
c.disp();
}
for(i=0;i<5;i++) {
c -= b;
c.disp();
}
for(i=0;i<5;i++) {
c++;
c.disp();
}
for(i=0;i<5;i++) {
++c;
c.disp();
}
for(i=0;i<5;i++) {
c--;
c.disp();
}
for(i=0;i<5;i++) {
--c;
c.disp();
}
return 0;
}
Computing file changes ...