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
Raw File
t1025.h
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (root-cint@cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/
// file arrayfunc.C
#include <stdio.h>
#include <iostream>

typedef float array_t[4];

float myarray[4][4];

//#if defined(__MAKECINT__)
//#else
const array_t& arrayret(int i) {

   for(int i=0; i<4; i++)
      for(int j=0; j<4; j++)
         myarray[i][j] = (i+1)*10+(j+1);

   void *v = &(myarray[0][0]);

   array_t *arr = (array_t*)v;
   // array_t &ret( arr[1] );

   return arr[1];

   // Interpreting arrayret causes segv when destrying arr. float *arr[]
}
//#endif

void arrayfunc() {

   float f = arrayret(1)[1];

   fprintf(stdout,"the printed value should equal to 22: %f\n",f);
   std::cout << "should also be 22: " << arrayret(1)[1] << std::endl;
}

back to top