How to place text labels on iGeo.

Hello, I need to place coordinate labels (from excel XlsReader) to each of the points. I'm using iGeo for the visual part, and this library does not allow me the use of text. Only gives me options "iText" but I do not understand : ( Can anyone help? Below I leave the code:

import de.bezier.data.*;

import processing.opengl.*;
import igeo.*;


void setup ()
{
  XlsReader reader;

  size(1366, 768, IG.GL );
  IG.bg(0); //black background

  reader = new XlsReader( this, "2013.xls" );    

  for (int i=0; i < 15; i++) {
    for (int j=0; j < 15; j++) {
      if ( 4 >= reader.getInt(i, j) ) {
        new IPoint(i*10, j*10, -40).clr(255, 0, 0);
        new ICurve (i*10, j*10, -40, i*10, j*10, -45).clr(255, 0, 0);
        println(i);
      }
      else if (6 >= reader.getInt(i, j) ) {
        new IPoint(i*10, j*10, -20).clr(255, 255, 0);
        new ICurve (i*10, j*10, -20, i*10, j*10, -25).clr(255, 255, 0);
      }
      else if (8 >= reader.getInt(i, j) ) {
        new IPoint(i*10, j*10, 0).clr(0, 70, 255);
        new ICurve (i*10, j*10, 0, i*10, j*10, -5).clr(0, 70, 255);
      }
      else if (10 >= reader.getInt(i, j) ) {
        new IPoint(i*10, j*10, 20).clr(0, 255, 0);
        new ICurve (i*10, j*10, 20, i*10, j*10, 15).clr(0, 255, 0);
      }
      else {
        new IPoint(i*10, j*10, 40).clr(255);
        new ICurve (i*10, j*10, 40, i*10, j*10, 35).clr(255);
      }
    }
  }
}

Captura de pantalla 2013-12-06 a la(s) 19.58.54

Captura de pantalla 2013-12-06 a la(s) 20.01.20

Thanks for the help

Leopoldo

Tagged:

Answers

Sign In or Register to comment.