thplot-cvs Mailing List for thplot
Status: Pre-Alpha
Brought to you by:
apeden
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(26) |
Jul
(34) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Tony P. <ap...@us...> - 2002-07-12 14:56:27
|
Update of /cvsroot/thplot/thplot
In directory usw-pr-cvs1:/tmp/cvs-serv30422
Modified Files:
configure.in
Log Message:
Updates for Mandrake 8.2
Index: configure.in
===================================================================
RCS file: /cvsroot/thplot/thplot/configure.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** configure.in 6 Jul 2002 14:45:15 -0000 1.7
--- configure.in 12 Jul 2002 14:56:24 -0000 1.8
***************
*** 77,80 ****
--- 77,85 ----
else
AC_CHECK_LIB(GL, glNewList)
+ if test "x$ac_cv_lib_GL_glNewList" = "xno"; then
+ unset ac_cv_lib_GL_glNewList
+ LDFLAGS="-L/usr/X11R6/lib"
+ AC_CHECK_LIB(GL, glNewList)
+ fi
AC_CHECK_LIB(GLU, gluGetString)
AC_CHECK_LIB(fltk,fl_yes)
|
|
From: Tony P. <ap...@us...> - 2002-07-08 11:20:18
|
Update of /cvsroot/thplot/thplot/src/Draw
In directory usw-pr-cvs1:/tmp/cvs-serv14363
Modified Files:
Curve.cpp Symbol.h Curve.h
Log Message:
Change symbol and line style assignment logic so that the line style is not incremented until all symbol types have been exhausted.
Add api for getting/setting line and symbol types.
Index: Curve.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Curve.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Curve.cpp 6 Jul 2002 14:49:40 -0000 1.4
--- Curve.cpp 8 Jul 2002 11:20:15 -0000 1.5
***************
*** 37,41 ****
symbols_on=true;
lstyle=solid;
! //lstyle=linestyles(index % Nstyles);
symbols = new Symbol(SymbolType(index % NSymbolTypes),false);
xthreshold=2;ythreshold=5;
--- 37,43 ----
symbols_on=true;
lstyle=solid;
! //only increment the line style after all symbol types have
! //been used
! lstyle=LineStyle( int(index / NSymbolTypes) % Nstyles );
symbols = new Symbol(SymbolType(index % NSymbolTypes),false);
xthreshold=2;ythreshold=5;
***************
*** 74,78 ****
glEnable(GL_LINE_STIPPLE);
glLineStipple(1,lsmask[lstyle]);
! glLineWidth(2);
}
--- 76,80 ----
glEnable(GL_LINE_STIPPLE);
glLineStipple(1,lsmask[lstyle]);
! glLineWidth(1);
}
Index: Symbol.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Symbol.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Symbol.h 6 Jul 2002 14:49:40 -0000 1.1
--- Symbol.h 8 Jul 2002 11:20:15 -0000 1.2
***************
*** 40,44 ****
~Symbol(void);
! void setType(SymbolType type) { stype=type; regen=true; }
SymbolType getType(void) { return stype; }
--- 40,45 ----
~Symbol(void);
! void setType(SymbolType type)
! { stype= SymbolType(type % NSymbolTypes); regen=true; }
SymbolType getType(void) { return stype; }
Index: Curve.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Curve.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Curve.h 6 Jul 2002 14:49:40 -0000 1.4
--- Curve.h 8 Jul 2002 11:20:15 -0000 1.5
***************
*** 34,39 ****
#include <Draw/Grid.h>
! typedef enum { solid, dash, dashdotdash } linestyles;
! const int lsmask[] = { 0x7fff, 0xF0F0, 0x1C47, 0x33cf };
const int Nstyles = 4;
--- 34,39 ----
#include <Draw/Grid.h>
! typedef enum { solid, dash, dashdot, dashdashdot } LineStyle;
! const int lsmask[] = { 0x7fff, 0xf0f0, 0x1c47, 0x33cf };
const int Nstyles = 4;
***************
*** 53,56 ****
--- 53,62 ----
float getSymbolDrawYThreshold( void ) { return ythreshold; }
+ LineStyle getLineType(void) { return lstyle; }
+ SymbolType getSymbolType(void) { return symbols->getType(); }
+
+ void setLineType(LineStyle ls) { lstyle = LineStyle(ls % Nstyles); }
+ void setSymbolType(SymbolType st) { symbols->setType(st); }
+
bool DrawGL(void);
***************
*** 63,67 ****
string ind_pname, dep_pname;
bool lines_on, symbols_on;
! linestyles lstyle;
float xthreshold,ythreshold;
};
--- 69,73 ----
string ind_pname, dep_pname;
bool lines_on, symbols_on;
! LineStyle lstyle;
float xthreshold,ythreshold;
};
|
|
From: Tony P. <ap...@us...> - 2002-07-07 15:54:55
|
Update of /cvsroot/thplot/thplot/src/Data
In directory usw-pr-cvs1:/tmp/cvs-serv32621
Modified Files:
csvData.h csvData.cpp
Log Message:
Changed data structure from vector of vectors to vector of arrays for speed.
The resulting improvement wasn't much.
Index: csvData.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Data/csvData.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** csvData.h 4 Jul 2002 23:42:36 -0000 1.2
--- csvData.h 7 Jul 2002 15:54:52 -0000 1.3
***************
*** 49,53 ****
int getNumPoints(int pidx) {if (NumData.size() > 0) return(NumData.size()); else return(0);}
int getNumPoints(string name) { return NumData.size(); }
! int getNumParameters(void) {return(NumData[0].size());}
double getStartTime(void) {if (NumData.size() >= 2) return(NumData[0][0]); else return(0);}
double getEndTime(void) {if (NumData.size() >= 2) return(NumData[NumData.size()-1][0]); else return(0);}
--- 49,53 ----
int getNumPoints(int pidx) {if (NumData.size() > 0) return(NumData.size()); else return(0);}
int getNumPoints(string name) { return NumData.size(); }
! int getNumParameters(void) {return(names.size());}
double getStartTime(void) {if (NumData.size() >= 2) return(NumData[0][0]); else return(0);}
double getEndTime(void) {if (NumData.size() >= 2) return(NumData[NumData.size()-1][0]); else return(0);}
***************
*** 66,77 ****
std::vector<string> names;
string data_str;
! typedef std::vector <double> Row;
! typedef std::vector <Row> DataType;
DataType NumData;
string buff_str;
ifstream f;
! Row Max;
! Row Min;
int StartIdx, EndIdx;
--- 66,76 ----
std::vector<string> names;
string data_str;
! typedef std::vector <double*> DataType;
DataType NumData;
string buff_str;
ifstream f;
! std::vector<double> Max;
! std::vector<double> Min;
int StartIdx, EndIdx;
Index: csvData.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Data/csvData.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** csvData.cpp 4 Jul 2002 23:42:36 -0000 1.2
--- csvData.cpp 7 Jul 2002 15:54:52 -0000 1.3
***************
*** 81,84 ****
--- 81,85 ----
int row=0, column=0;
+ int Ncolumns = names.size();
while (1) {
***************
*** 86,90 ****
getline(f, data_str);
if(f.eof()) break;
! NumData.push_back(*(new Row()));
end = 0;
while (1) {
--- 87,91 ----
getline(f, data_str);
if(f.eof()) break;
! NumData.push_back(new double[Ncolumns]);
end = 0;
while (1) {
***************
*** 97,115 ****
end = data_str.size();
var = data_str.substr(start, end-start);
! NumData[row].push_back(atof(var.c_str()));
! //cout << row << ", " << column << endl;
column++;
break;
} else {
var = data_str.substr(start, end-start);
! NumData[row].push_back(atof(var.c_str()));
! //cout << row << ", " << column << endl;
column++;
end++;
}
! if (column == count || column > 30000 ) break;
}
row++;
- //if (row > 5 ) break;
}
--- 98,117 ----
end = data_str.size();
var = data_str.substr(start, end-start);
! if(!var.empty()) {
! NumData[row][column]=atof( var.c_str() );
! }
! //cout << row << ", " << column << "::" << var << "::" << endl;
column++;
break;
} else {
var = data_str.substr(start, end-start);
! NumData[row][column]=atof( var.c_str() );
! //cout << row << ", " << column << "::" << var << "::" << endl;
column++;
end++;
}
! if (column == Ncolumns || column > 30000 ) break;
}
row++;
}
|
|
From: Tony P. <ap...@us...> - 2002-07-06 14:51:52
|
Update of /cvsroot/thplot/thplot/src/Main In directory usw-pr-cvs1:/tmp/cvs-serv20431 Modified Files: Globals.h Log Message: Added global constant for pi (TH_PI) Index: Globals.h =================================================================== RCS file: /cvsroot/thplot/thplot/src/Main/Globals.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Globals.h 4 Jul 2002 23:42:36 -0000 1.3 --- Globals.h 6 Jul 2002 14:51:49 -0000 1.4 *************** *** 28,31 **** --- 28,33 ---- #define GLOBAL_H + const double TH_PI=3.1415926; + #include <FL/Fl_Gl_Window.h> |
|
From: Tony P. <ap...@us...> - 2002-07-06 14:49:43
|
Update of /cvsroot/thplot/thplot/src/Draw In directory usw-pr-cvs1:/tmp/cvs-serv19951 Modified Files: Curve.cpp Curve.h Makefile.am Added Files: Symbol.cpp Symbol.h Log Message: Support for mulitple symbol types. --- NEW FILE --- /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Header: Symbol.cpp Author: Tony Peden Date started: 7/6/02 ------------- Copyright (C) 2002 Tony Peden (ap...@ea...) ----------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Further information about the GNU General Public License can also be found on the world wide web at http://www.gnu.org. */ #include <iostream> #include <FL/gl.h> #include <GL/gl.h> #include <Main/Globals.h> #include <Draw/Symbol.h> Symbol::Symbol(SymbolType type, bool fill) { stype=type; filled=fill; regen=true; listid=0; radius=1.5; } Symbol::~Symbol(void) { if(listid) glDeleteLists(listid,1); } void Symbol::DrawGL(float x, float y) { if(regen) { if(listid) glDeleteLists(listid,1); listid=0; listid=glGenLists(1); genList(); } glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslatef(x,y,0); glCallList(listid); glPopMatrix(); } void Symbol::genList(void) { glNewList(listid, GL_COMPILE); glColor3f(0,0,0); glLineWidth(1); glPointSize(1); glBegin(GL_POINTS); glVertex2f(0,0); glEnd(); switch(stype) { case circle: case triangle: case square: case pentagon: int sides; float x,y; if( stype == circle ) { sides=10; } else sides = int(stype); glBegin(GL_LINE_LOOP); for(float i=0;i<sides;i++) { x=radius*cos(i/sides*2*TH_PI); y=radius*sin(i/sides*2*TH_PI); glVertex2f(x,y); } glEnd(); break; case plussign: glBegin(GL_LINES); glVertex2f(-radius,0); glVertex2f(radius,0); glEnd(); glBegin(GL_LINES); glVertex2f(0,-radius); glVertex2f(0,radius); glEnd(); break; case diamond: glBegin(GL_LINE_LOOP); glVertex2f(0,radius); glVertex2f(0.75*radius,0); glVertex2f(0,-radius); glVertex2f(-0.75*radius,0); glEnd(); break; } glEndList(); } --- NEW FILE --- /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Header: Symbol.h Author: Tony Peden Date started: 7/6/02 ------------- Copyright (C) 2002 Tony Peden (ap...@ea...) ----------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Further information about the GNU General Public License can also be found on the world wide web at http://www.gnu.org. */ #ifndef SYMBOL_H #define SYMBOL_H #include <FL/gl.h> #include <GL/gl.h> typedef enum { circle=0, plussign, diamond, triangle, square, pentagon } SymbolType; const int NSymbolTypes=6; class Symbol { public: Symbol(SymbolType type, bool fill); ~Symbol(void); void setType(SymbolType type) { stype=type; regen=true; } SymbolType getType(void) { return stype; } void setFilled(bool fill) { filled=fill; regen=true; } bool getFilled(void) { return filled; } void setRadius(float r) { radius=r; regen=true; } float getRadius(void) { return radius; } void DrawGL(float x, float y); private: SymbolType stype; bool filled; bool regen; float radius; GLuint listid; void genList(void); }; #endif Index: Curve.cpp =================================================================== RCS file: /cvsroot/thplot/thplot/src/Draw/Curve.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Curve.cpp 4 Jul 2002 15:53:26 -0000 1.3 --- Curve.cpp 6 Jul 2002 14:49:40 -0000 1.4 *************** *** 26,30 **** --- 26,32 ---- #include <Draw/Curve.h> + #include <Draw/Symbol.h> #include <Data/csvData.h> + Curve::Curve(Globals *g, Grid *p, int idx){ *************** *** 32,41 **** parent=p; index=idx; ! lines=true; ! symbols=false; ! lstyle=linestyles(index % Nstyles); }; ! Curve::~Curve(void) {} --- 34,46 ---- parent=p; index=idx; ! lines_on=true; ! symbols_on=true; ! lstyle=solid; ! //lstyle=linestyles(index % Nstyles); ! symbols = new Symbol(SymbolType(index % NSymbolTypes),false); ! xthreshold=2;ythreshold=5; }; ! Curve::~Curve(void) { delete symbols; } *************** *** 48,66 **** iIndep = d->getParameterIdx( parent->getIndepName() ); ! if( symbols ) { ! glPointSize(4); ! // Makes points round rather than boxes ! glEnable(GL_POINT_SMOOTH); ! glColor3f(0,0,0); ! glBegin(GL_POINTS); for(int i=0;i<d->getNumPoints(iIndep);i++) { x = parent->convertIndepCoord( d->getValue(iIndep,i) ); y = parent->convertDepCoord( d->getValue(iDep,i) ); ! glVertex2f(x,y); } - glEnd(); } ! if(lines) { if(lstyle == solid) { glDisable(GL_LINE_STIPPLE); --- 53,71 ---- iIndep = d->getParameterIdx( parent->getIndepName() ); ! if( symbols_on ) { ! float lastx, lasty,dx,dy; ! lastx=lasty=0; for(int i=0;i<d->getNumPoints(iIndep);i++) { x = parent->convertIndepCoord( d->getValue(iIndep,i) ); y = parent->convertDepCoord( d->getValue(iDep,i) ); ! dx = x - lastx; dy = y - lasty; ! if( i==0 || dx > xthreshold || dy > ythreshold) { ! symbols->DrawGL(x,y); ! lastx=x;lasty=y; ! } } } ! if(lines_on) { if(lstyle == solid) { glDisable(GL_LINE_STIPPLE); Index: Curve.h =================================================================== RCS file: /cvsroot/thplot/thplot/src/Draw/Curve.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Curve.h 4 Jul 2002 15:53:26 -0000 1.3 --- Curve.h 6 Jul 2002 14:49:40 -0000 1.4 *************** *** 31,34 **** --- 31,35 ---- #include <Data/csvData.h> #include <Main/Globals.h> + #include <Draw/Symbol.h> #include <Draw/Grid.h> *************** *** 43,48 **** ~Curve(void); ! void LinesOn(bool tt) { lines = tt; } ! void SymbolsOn(bool tt) { symbols = tt; } bool DrawGL(void); --- 44,55 ---- ~Curve(void); ! void LinesOn(bool tt) { lines_on = tt; } ! void SymbolsOn(bool tt) { symbols_on = tt; } ! ! void setSymbolDrawXThreshold( float xt ) { xthreshold=xt; } ! float getSymbolDrawXThreshold( void ) { return xthreshold; } ! ! void setSymbolDrawYThreshold( float yt ) { ythreshold=yt; } ! float getSymbolDrawYThreshold( void ) { return ythreshold; } bool DrawGL(void); *************** *** 51,59 **** Globals *global; Grid *parent; csvData *data; int index; string ind_pname, dep_pname; ! bool lines, symbols; linestyles lstyle; }; --- 58,68 ---- Globals *global; Grid *parent; + Symbol *symbols; csvData *data; int index; string ind_pname, dep_pname; ! bool lines_on, symbols_on; linestyles lstyle; + float xthreshold,ythreshold; }; Index: Makefile.am =================================================================== RCS file: /cvsroot/thplot/thplot/src/Draw/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Makefile.am 22 Jun 2002 11:57:09 -0000 1.1.1.1 --- Makefile.am 6 Jul 2002 14:49:40 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- Plot.cpp Plot.h \ Curve.cpp Curve.h \ + Symbol.cpp Symbol.h \ drawObject.cpp drawObject.h |
|
From: Tony P. <ap...@us...> - 2002-07-06 14:45:18
|
Update of /cvsroot/thplot/thplot
In directory usw-pr-cvs1:/tmp/cvs-serv19135
Modified Files:
configure.in
Log Message:
Only explicitly link png lib on cygwin
Index: configure.in
===================================================================
RCS file: /cvsroot/thplot/thplot/configure.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** configure.in 4 Jul 2002 15:59:17 -0000 1.6
--- configure.in 6 Jul 2002 14:45:15 -0000 1.7
***************
*** 33,37 ****
#
! AC_CHECK_LIB(png,png_create_read_struct)
AC_CHECK_LIB(freetype,FT_Init_FreeType)
--- 33,37 ----
#
!
AC_CHECK_LIB(freetype,FT_Init_FreeType)
***************
*** 74,79 ****
CXXFLAGS="$CXXFLAGS -DWIN32"
fi
! echo $LIBS
! echo $CXXFLAGS
else
AC_CHECK_LIB(GL, glNewList)
--- 74,78 ----
CXXFLAGS="$CXXFLAGS -DWIN32"
fi
! AC_CHECK_LIB(png,png_create_read_struct)
else
AC_CHECK_LIB(GL, glNewList)
|
|
From: Tony P. <ap...@us...> - 2002-07-04 23:42:39
|
Update of /cvsroot/thplot/thplot/src/Util
In directory usw-pr-cvs1:/tmp/cvs-serv17611/src/Util
Modified Files:
Autoscale.cpp OGLFT.h
Log Message:
Compile fixes for g++ 3.0.4
Index: Autoscale.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Util/Autoscale.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Autoscale.cpp 3 Jul 2002 16:13:59 -0000 1.4
--- Autoscale.cpp 4 Jul 2002 23:42:36 -0000 1.5
***************
*** 151,155 ****
i=1;
while(1) {
! tmpMin=makeMultipleOf(iMin,pow(10,i),false);
if( tmpMax-(iMin-tmpMin) > iMax && i < 10 ) {
tmpMax=tmpMax-(iMin-tmpMin);
--- 151,155 ----
i=1;
while(1) {
! tmpMin=makeMultipleOf(iMin,int(pow(10,i)),false);
if( tmpMax-(iMin-tmpMin) > iMax && i < 10 ) {
tmpMax=tmpMax-(iMin-tmpMin);
Index: OGLFT.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Util/OGLFT.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** OGLFT.h 30 Jun 2002 14:46:55 -0000 1.1
--- OGLFT.h 4 Jul 2002 23:42:36 -0000 1.2
***************
*** 52,55 ****
--- 52,57 ----
#include FT_TRIGONOMETRY_H
+ using namespace std;
+
//! All of OGLFT C++ objects are in this namespace.
|
|
From: Tony P. <ap...@us...> - 2002-07-04 23:42:39
|
Update of /cvsroot/thplot/thplot/src/Data
In directory usw-pr-cvs1:/tmp/cvs-serv17611/src/Data
Modified Files:
csvData.cpp csvData.h
Log Message:
Compile fixes for g++ 3.0.4
Index: csvData.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Data/csvData.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** csvData.cpp 22 Jun 2002 11:57:12 -0000 1.1.1.1
--- csvData.cpp 4 Jul 2002 23:42:36 -0000 1.2
***************
*** 23,26 ****
--- 23,28 ----
#include <stdlib.h>
+ using namespace std;
+
csvData::csvData(Globals *g){
global = g;
Index: csvData.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Data/csvData.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** csvData.h 22 Jun 2002 11:57:12 -0000 1.1.1.1
--- csvData.h 4 Jul 2002 23:42:36 -0000 1.2
***************
*** 23,26 ****
--- 23,27 ----
#include <fstream>
+ #include <iostream>
#include <cstdio>
#include <string>
***************
*** 29,32 ****
--- 30,35 ----
#include <cmath>
#include <Main/Globals.h>
+
+ using namespace std;
/**This class handles reading a data file and placing user-requested data into arrays for plotting.
|
|
From: Tony P. <ap...@us...> - 2002-07-04 23:42:39
|
Update of /cvsroot/thplot/thplot/src/Draw
In directory usw-pr-cvs1:/tmp/cvs-serv17611/src/Draw
Modified Files:
Axis.cpp Axis.h Grid.cpp Grid.h
Log Message:
Compile fixes for g++ 3.0.4
Index: Axis.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Axis.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Axis.cpp 3 Jul 2002 16:13:59 -0000 1.6
--- Axis.cpp 4 Jul 2002 23:42:36 -0000 1.7
***************
*** 66,70 ****
Axis::~Axis(void){}
! bool Axis::DrawGL(double min, double max, double delta, ParamList& pnames ) {
float x2, y2;
int i;
--- 66,71 ----
Axis::~Axis(void){}
! bool Axis::DrawGL(double min, double max, double delta,
! ParameterSelect::ParamList& pnames ) {
float x2, y2;
int i;
Index: Axis.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Axis.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Axis.h 3 Jul 2002 13:23:40 -0000 1.4
--- Axis.h 4 Jul 2002 23:42:36 -0000 1.5
***************
*** 30,38 ****
#include <string>
- //#define OGLFT_NO_QT
- //#define OGLFT_NO_SOLID
#include <Util/OGLFT.h>
#include <Main/Globals.h>
#include <Draw/Grid.h>
--- 30,37 ----
#include <string>
#include <Util/OGLFT.h>
#include <Main/Globals.h>
+ #include <Gui/ParameterSelect.h>
#include <Draw/Grid.h>
***************
*** 48,52 ****
void tickLabels(bool enable) { labelson = enable; }
void setWidth(float w) { width = w; }
! bool DrawGL( double min, double max, double delta, ParamList& pnames);
void setAxisLabel(string al) { axisLabel = al; }
string getAxisLabel(void) { return axisLabel; }
--- 47,52 ----
void tickLabels(bool enable) { labelson = enable; }
void setWidth(float w) { width = w; }
! bool DrawGL( double min, double max, double delta,
! ParameterSelect::ParamList& pnames);
void setAxisLabel(string al) { axisLabel = al; }
string getAxisLabel(void) { return axisLabel; }
Index: Grid.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Grid.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Grid.cpp 4 Jul 2002 15:53:26 -0000 1.5
--- Grid.cpp 4 Jul 2002 23:42:36 -0000 1.6
***************
*** 43,47 ****
}
! void Grid::setData(csvData *d, string independent, ParamList dependents) {
if( d != NULL ) {
data = d;
--- 43,48 ----
}
! void Grid::setData(csvData *d, string independent,
! ParameterSelect::ParamList dependents) {
if( d != NULL ) {
data = d;
Index: Grid.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Grid.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Grid.h 2 Jul 2002 17:20:42 -0000 1.2
--- Grid.h 4 Jul 2002 23:42:36 -0000 1.3
***************
*** 19,27 ****
#define GRID_H
#include <Draw/Axis.h>
#include <Draw/Curve.h>
#include <Draw/Grid.h>
#include <Data/csvData.h>
! #include <Main/Globals.h>
/**
*@author Tony Peden
--- 19,29 ----
#define GRID_H
+ #include <Main/Globals.h>
#include <Draw/Axis.h>
#include <Draw/Curve.h>
#include <Draw/Grid.h>
#include <Data/csvData.h>
! #include <Gui/ParameterSelect.h>
!
/**
*@author Tony Peden
***************
*** 39,43 ****
double getW(void) { return w; }
double getH(void) { return h; }
! void setData(csvData* d, string independent, ParamList dependents);
void clearData(void);
csvData* getData(void) { return data; }
--- 41,46 ----
double getW(void) { return w; }
double getH(void) { return h; }
! void setData(csvData* d, string independent,
! ParameterSelect::ParamList dependents);
void clearData(void);
csvData* getData(void) { return data; }
***************
*** 65,70 ****
CurveList curves;
! ParamList indep_names;
! ParamList dep_names;
double indep2grid,indep_max,indep_min;
--- 68,73 ----
CurveList curves;
! ParameterSelect::ParamList indep_names;
! ParameterSelect::ParamList dep_names;
double indep2grid,indep_max,indep_min;
|
|
From: Tony P. <ap...@us...> - 2002-07-04 23:42:39
|
Update of /cvsroot/thplot/thplot/src/Main
In directory usw-pr-cvs1:/tmp/cvs-serv17611/src/Main
Modified Files:
Globals.h
Log Message:
Compile fixes for g++ 3.0.4
Index: Globals.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Main/Globals.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Globals.h 2 Jul 2002 17:20:42 -0000 1.2
--- Globals.h 4 Jul 2002 23:42:36 -0000 1.3
***************
*** 28,40 ****
#define GLOBAL_H
- #include <string>
- #include <vector>
-
#include <FL/Fl_Gl_Window.h>
typedef enum { letter, legal, tabloid, A3, A4 } PaperSizes;
- typedef vector<string> ParamList;
-
class Globals {
public:
--- 28,35 ----
|
|
From: Tony P. <ap...@us...> - 2002-07-04 23:42:39
|
Update of /cvsroot/thplot/thplot/src/Gui
In directory usw-pr-cvs1:/tmp/cvs-serv17611/src/Gui
Modified Files:
ParameterSelect.h
Log Message:
Compile fixes for g++ 3.0.4
Index: ParameterSelect.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Gui/ParameterSelect.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ParameterSelect.h 3 Jul 2002 13:24:50 -0000 1.3
--- ParameterSelect.h 4 Jul 2002 23:42:36 -0000 1.4
***************
*** 51,55 ****
--- 51,58 ----
string getSelectedIndependent(void) { return ind_name; }
+
+ typedef vector<string> ParamList;
ParamList getSelectedDependents(void) { return dep_names; }
+
bool selectionAvailable(void) { return selected; }
|
|
From: Tony P. <ap...@us...> - 2002-07-04 15:59:21
|
Update of /cvsroot/thplot/thplot In directory usw-pr-cvs1:/tmp/cvs-serv23645 Modified Files: configure.in Log Message: Incremented version number. Index: configure.in =================================================================== RCS file: /cvsroot/thplot/thplot/configure.in,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** configure.in 4 Jul 2002 13:17:24 -0000 1.5 --- configure.in 4 Jul 2002 15:59:17 -0000 1.6 *************** *** 4,8 **** AC_PREREQ(2.13) ! AM_INIT_AUTOMAKE(thplot, 0.12.4) AM_CONFIG_HEADER(config.h) --- 4,8 ---- AC_PREREQ(2.13) ! AM_INIT_AUTOMAKE(thplot, 0.12.5) AM_CONFIG_HEADER(config.h) |
|
From: Tony P. <ap...@us...> - 2002-07-04 15:53:30
|
Update of /cvsroot/thplot/thplot/src/Draw
In directory usw-pr-cvs1:/tmp/cvs-serv21175
Modified Files:
Grid.cpp Curve.cpp Curve.h
Log Message:
Added support for drawing curves with different line styles.
Index: Grid.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Grid.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Grid.cpp 2 Jul 2002 17:20:42 -0000 1.4
--- Grid.cpp 4 Jul 2002 15:53:26 -0000 1.5
***************
*** 119,122 ****
--- 119,123 ----
void Grid::drawGridLines(void) {
if( independent ) {
+ glLineWidth(1);
glColor3f(0.5,0.5,0.5);
if( indep_major_gridlines ) {
***************
*** 142,145 ****
--- 143,147 ----
if( dependent ) {
+ glLineWidth(1);
glColor3f(0.5,0.5,0.5);
if( dep_major_gridlines ) {
Index: Curve.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Curve.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Curve.cpp 2 Jul 2002 17:20:42 -0000 1.2
--- Curve.cpp 4 Jul 2002 15:53:26 -0000 1.3
***************
*** 33,37 ****
index=idx;
lines=true;
! symbols=true;
};
--- 33,38 ----
index=idx;
lines=true;
! symbols=false;
! lstyle=linestyles(index % Nstyles);
};
***************
*** 62,66 ****
if(lines) {
! glLineWidth(1);
glColor3f(0,0,0);
glBegin(GL_LINE_STRIP);
--- 63,75 ----
if(lines) {
! if(lstyle == solid) {
! glDisable(GL_LINE_STIPPLE);
! glLineWidth(1);
! } else {
! glEnable(GL_LINE_STIPPLE);
! glLineStipple(1,lsmask[lstyle]);
! glLineWidth(2);
! }
!
glColor3f(0,0,0);
glBegin(GL_LINE_STRIP);
Index: Curve.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Curve.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Curve.h 2 Jul 2002 17:20:42 -0000 1.2
--- Curve.h 4 Jul 2002 15:53:26 -0000 1.3
***************
*** 33,36 ****
--- 33,41 ----
#include <Draw/Grid.h>
+ typedef enum { solid, dash, dashdotdash } linestyles;
+ const int lsmask[] = { 0x7fff, 0xF0F0, 0x1C47, 0x33cf };
+ const int Nstyles = 4;
+
+
class Curve {
public:
***************
*** 50,53 ****
--- 55,59 ----
string ind_pname, dep_pname;
bool lines, symbols;
+ linestyles lstyle;
};
|
|
From: Tony P. <ap...@us...> - 2002-07-04 13:59:35
|
Update of /cvsroot/thplot/thplot
In directory usw-pr-cvs1:/tmp/cvs-serv7075
Modified Files:
ChangeLog
Log Message:
Reformatted to show most recent version at top of file
Index: ChangeLog
===================================================================
RCS file: /cvsroot/thplot/thplot/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ChangeLog 3 Jul 2002 16:26:36 -0000 1.3
--- ChangeLog 4 Jul 2002 13:59:32 -0000 1.4
***************
*** 1,10 ****
- 0.10 -- initial private release
- 0.11 -- tweaks to the build system for cygwin
- 0.12 -- graphical file and parameter selection added
- 0.12.1 -- major and minor grid lines
- 0.12.2 -- initial public release
- 0.12.3 -- Dialog positioning tweaks
- New font rendering based on OGLFT and freetype
- Big improvements to the autoscaling
0.12.4 -- New parameter selection dialog
Automatically open parameter select after file open
--- 1,2 ----
***************
*** 13,15 ****
--- 5,16 ----
symbols or line types yet.
Temporary fix for file open bug
+ 0.12.3 -- Dialog positioning tweaks
+ New font rendering based on OGLFT and freetype
+ Big improvements to the autoscaling
+ 0.12.2 -- initial public release
+ 0.12.1 -- major and minor grid lines
+ 0.12 -- graphical file and parameter selection added
+ 0.11 -- tweaks to the build system for cygwin
+ 0.10 -- initial private release
+
|
|
From: Tony P. <ap...@us...> - 2002-07-04 13:17:27
|
Update of /cvsroot/thplot/thplot
In directory usw-pr-cvs1:/tmp/cvs-serv26286
Modified Files:
configure.in
Log Message:
Improved search for freetype headers
Index: configure.in
===================================================================
RCS file: /cvsroot/thplot/thplot/configure.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** configure.in 3 Jul 2002 16:13:19 -0000 1.4
--- configure.in 4 Jul 2002 13:17:24 -0000 1.5
***************
*** 36,49 ****
AC_CHECK_LIB(freetype,FT_Init_FreeType)
! # took this check from configure.ac distributed with OGLFT 0.7
! AC_CHECK_HEADER(ft2build.h,,
! AC_MSG_WARN([could not successfully compile with FreeType2 using the])
! AC_MSG_WARN([default compiler flags; re-trying with])
! AC_MSG_WARN([CPPFLAGS=$CPPFLAGS -I/usr/include/freetype2])
! CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2"
unset ac_cv_header_ft2build_h
! AC_CHECK_HEADER(ft2build.h,,
! AC_MSG_ERROR([could not find FreeType2 headers]))
! )
if test "x$is_cygwin" = "xyes" ; then
--- 36,61 ----
AC_CHECK_LIB(freetype,FT_Init_FreeType)
! #this is pure silliness, but AC_CHECK_HEADER(freetype2/ft2build.h)
! #doesn't seem to work
! save_CPPFLAGS=$CPPFLAGS
! AC_CHECK_HEADER(ft2build.h)
! if test "x$ac_cv_header_ft2build_h" = "xno"; then
! #try /usr/include/freetype2
unset ac_cv_header_ft2build_h
! CPPFLAGS="$save_CPPFLAGS -I/usr/include/freetype2"
! AC_CHECK_HEADER(ft2build.h)
! fi
!
! if test "x$ac_cv_header_ft2build_h" = "xno"; then
! #try /usr/local/include/freetype2
! unset ac_cv_header_ft2build_h
! CPPFLAGS="$save_CPPFLAGS -I/usr/local/include/freetype2"
! AC_CHECK_HEADER(ft2build.h)
! fi
!
! if test "x$ac_cv_header_ft2build_h" = "xno"; then
! CPPFLAGS=$save_CPPFLAGS
! fi
!
if test "x$is_cygwin" = "xyes" ; then
|
|
From: Tony P. <ap...@us...> - 2002-07-03 16:26:39
|
Update of /cvsroot/thplot/thplot
In directory usw-pr-cvs1:/tmp/cvs-serv10253
Modified Files:
ChangeLog
Log Message:
Changes for 0.12.4
Index: ChangeLog
===================================================================
RCS file: /cvsroot/thplot/thplot/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ChangeLog 30 Jun 2002 14:26:31 -0000 1.2
--- ChangeLog 3 Jul 2002 16:26:36 -0000 1.3
***************
*** 7,8 ****
--- 7,15 ----
New font rendering based on OGLFT and freetype
Big improvements to the autoscaling
+ 0.12.4 -- New parameter selection dialog
+ Automatically open parameter select after file open
+ Better formatting and position of numeric tick labels
+ Will now plot multiple parameters, but not with different
+ symbols or line types yet.
+ Temporary fix for file open bug
+
|
|
From: Tony P. <ap...@us...> - 2002-07-03 16:16:31
|
Update of /cvsroot/thplot/thplot In directory usw-pr-cvs1:/tmp/cvs-serv5926 Modified Files: autogen.sh Log Message: Run autoheader, too. Index: autogen.sh =================================================================== RCS file: /cvsroot/thplot/thplot/autogen.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** autogen.sh 30 Jun 2002 14:26:31 -0000 1.2 --- autogen.sh 3 Jul 2002 16:16:28 -0000 1.3 *************** *** 2,4 **** rm -f config.cache ! aclocal -I . && automake -a && autoconf &&./configure $* --- 2,4 ---- rm -f config.cache ! autoheader && aclocal -I . && automake -a && autoconf &&./configure $* |
|
From: Tony P. <ap...@us...> - 2002-07-03 16:14:03
|
Update of /cvsroot/thplot/thplot/src/Util
In directory usw-pr-cvs1:/tmp/cvs-serv4831/src/Util
Modified Files:
Autoscale.cpp
Log Message:
Removed couts
Index: Autoscale.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Util/Autoscale.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Autoscale.cpp 25 Jun 2002 11:16:38 -0000 1.3
--- Autoscale.cpp 3 Jul 2002 16:13:59 -0000 1.4
***************
*** 66,70 ****
int asmag,iMax,iMin,iRange,rem,rcorr;
int magnitude = int( log10(dataMax) );
! cout << "Max: " << dataMax << " Min: " << dataMin << " Ndiv: " << Ndiv << endl;
//cout << "Magnitude of min: " << magnitude << endl;
if( magnitude < 0 ) {
--- 66,70 ----
int asmag,iMax,iMin,iRange,rem,rcorr;
int magnitude = int( log10(dataMax) );
! //cout << "Max: " << dataMax << " Min: " << dataMin << " Ndiv: " << Ndiv << endl;
//cout << "Magnitude of min: " << magnitude << endl;
if( magnitude < 0 ) {
***************
*** 93,97 ****
asmin = iMin*pow(10,-1*asmag);
asdelta = (asmax - asmin) / Ndiv;
! cout << "ASMax: " << asmax << " ASMin: " << asmin << " ASDelta: " << asdelta << endl;
needCalc = false;
}
--- 93,97 ----
asmin = iMin*pow(10,-1*asmag);
asdelta = (asmax - asmin) / Ndiv;
! //cout << "ASMax: " << asmax << " ASMin: " << asmin << " ASDelta: " << asdelta << endl;
needCalc = false;
}
***************
*** 101,105 ****
int asmag,iDelta,iMin,iMax,magnitude;
int tmpMax, tmpMin, tmpMin2, tmpMin5;
! cout << "Max: " << dataMax << " Min: " << dataMin << " Ndiv: " << Ndiv << endl;
if( dataMax-dataMin == 0 ) {
asdelta=0.1;
--- 101,105 ----
int asmag,iDelta,iMin,iMax,magnitude;
int tmpMax, tmpMin, tmpMin2, tmpMin5;
! //cout << "Max: " << dataMax << " Min: " << dataMin << " Ndiv: " << Ndiv << endl;
if( dataMax-dataMin == 0 ) {
asdelta=0.1;
***************
*** 121,128 ****
tmpMin5=makeMultipleOf(iMin,5,false);
tmpMin2=makeMultipleOf(iMin,2,false);
! tmpMax;
! //if ( dataMin == 0 ) magnitude=0;
! //else magnitude = int( log10(fabs(dataMin)) )-1;
! magnitude=0;
int i=0;
while( i < 10 ) {
--- 121,125 ----
tmpMin5=makeMultipleOf(iMin,5,false);
tmpMin2=makeMultipleOf(iMin,2,false);
! magnitude=iDelta=tmpMax=0;
int i=0;
while( i < 10 ) {
***************
*** 150,155 ****
i++;
}
! cout << "Corrected iMax: " << iMax << " iMin: " << iMin << endl;
! cout << "tmpMax: " << tmpMax << endl;
i=1;
while(1) {
--- 147,152 ----
i++;
}
! //cout << "Corrected iMax: " << iMax << " iMin: " << iMin << endl;
! //cout << "tmpMax: " << tmpMax << endl;
i=1;
while(1) {
***************
*** 157,161 ****
if( tmpMax-(iMin-tmpMin) > iMax && i < 10 ) {
tmpMax=tmpMax-(iMin-tmpMin);
-
iMin=tmpMin;
} else {
--- 154,157 ----
***************
*** 165,173 ****
i++;
}
! cout << "Corrected iMax: " << iMax << " iMin: " << iMin << endl;
asmax = iMax*pow(10,-1*asmag);
asmin = iMin*pow(10,-1*asmag);
asdelta = iDelta*pow(10,-1*asmag);
! cout << "ASMax: " << asmax << " ASMin: " << asmin << " ASDelta: " << asdelta << endl;
needCalc = false;
}
--- 161,169 ----
i++;
}
! //cout << "Corrected iMax: " << iMax << " iMin: " << iMin << endl;
asmax = iMax*pow(10,-1*asmag);
asmin = iMin*pow(10,-1*asmag);
asdelta = iDelta*pow(10,-1*asmag);
! //cout << "ASMax: " << asmax << " ASMin: " << asmin << " ASDelta: " << asdelta << endl;
needCalc = false;
}
|
|
From: Tony P. <ap...@us...> - 2002-07-03 16:14:03
|
Update of /cvsroot/thplot/thplot/src/Main
In directory usw-pr-cvs1:/tmp/cvs-serv4831/src/Main
Modified Files:
main.cpp
Log Message:
Removed couts
Index: main.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Main/main.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** main.cpp 22 Jun 2002 11:57:11 -0000 1.1.1.1
--- main.cpp 3 Jul 2002 16:13:59 -0000 1.2
***************
*** 40,44 ****
g = new Globals();
mw = new MainWindow(g,argc,argv);
- cout << mw << endl;
int ret_val=Fl::run();
delete mw;
--- 40,43 ----
|
|
From: Tony P. <ap...@us...> - 2002-07-03 16:14:03
|
Update of /cvsroot/thplot/thplot/src/Draw
In directory usw-pr-cvs1:/tmp/cvs-serv4831/src/Draw
Modified Files:
Axis.cpp
Log Message:
Removed couts
Index: Axis.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Axis.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Axis.cpp 3 Jul 2002 14:56:01 -0000 1.5
--- Axis.cpp 3 Jul 2002 16:13:59 -0000 1.6
***************
*** 142,146 ****
snprintf(fmt,10,"%%g");
}
- cout << fmt << endl;
double value;
if(!vertical){
--- 142,145 ----
***************
*** 172,176 ****
string tmps;
tmps="";
- cout << "pnames.size(): " << pnames.size() << endl;
for(unsigned j=0;j<pnames.size();j++) {
tmps += pnames[j];
--- 171,174 ----
|
|
From: Tony P. <ap...@us...> - 2002-07-03 16:14:02
|
Update of /cvsroot/thplot/thplot/src/Gui
In directory usw-pr-cvs1:/tmp/cvs-serv4831/src/Gui
Modified Files:
MainWindow.cpp ParameterSelect.cpp
Log Message:
Removed couts
Index: MainWindow.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Gui/MainWindow.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** MainWindow.cpp 3 Jul 2002 13:32:56 -0000 1.3
--- MainWindow.cpp 3 Jul 2002 16:13:59 -0000 1.4
***************
*** 56,64 ****
flc->preview(0);
- //cout << data << endl;
}
MainWindow::~MainWindow(void) {
- //cout << "In ~MainWindow" << endl;
delete flc;
delete csvdata;
--- 56,62 ----
***************
*** 91,95 ****
void MainWindow::file_chooser_cb(Fl_File_Chooser* flw) {
- cout << flc->value() << endl;
}
--- 89,92 ----
***************
*** 112,116 ****
ps->showDialog(csvdata);
if( ps->selectionAvailable() ) {
- cout << "Calling setData()" << endl;
glw->getPlot()->getGrid(0)->setData(csvdata,
ps->getSelectedIndependent(),
--- 109,112 ----
Index: ParameterSelect.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Gui/ParameterSelect.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ParameterSelect.cpp 3 Jul 2002 13:24:50 -0000 1.4
--- ParameterSelect.cpp 3 Jul 2002 16:13:59 -0000 1.5
***************
*** 147,151 ****
void ParameterSelect::cancel_callback(Fl_Widget* flw) {
- cout << "In Cancel callback" << endl;
run=false;
ind_name = "";
--- 147,150 ----
***************
*** 154,162 ****
void ParameterSelect::ok_callback(Fl_Widget* flw) {
- cout << "In OK callback" << endl;
if ( independent->size() ) {
ind_name = independent->text( 1 );
- cout << ind_name << ", " << dependent->size() << endl;
for(int i=1;i<=dependent->size();i++) {
if(dependent->text(i) ) {
--- 153,159 ----
|
|
From: Tony P. <ap...@us...> - 2002-07-03 16:13:23
|
Update of /cvsroot/thplot/thplot
In directory usw-pr-cvs1:/tmp/cvs-serv4624
Modified Files:
configure.in
Log Message:
Improved freetype headers search
Index: configure.in
===================================================================
RCS file: /cvsroot/thplot/thplot/configure.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** configure.in 2 Jul 2002 17:22:11 -0000 1.3
--- configure.in 3 Jul 2002 16:13:19 -0000 1.4
***************
*** 26,37 ****
],is_cygwin=yes, is_cygwin=no)
echo "IS_CYGWIN = $is_cygwin"
AM_CONDITIONAL(IS_CYGWIN, test "x$is_cygwin" = "xyes")
#
if test "x$is_cygwin" = "xyes" ; then
AC_DEFINE(IS_CYGWIN)
- AC_CHECK_LIB(png,png_create_read_struct)
- AC_CHECK_LIB(freetype,FT_Init_FreeType)
AC_CHECK_PROG(have_fltk_config,fltk-config,"yes","no")
if test "x$have_fltk_config" = "xyes" ; then
--- 26,52 ----
],is_cygwin=yes, is_cygwin=no)
+ #display all warnings
+ CXXFLAGS="$CXXFLAGS -Wall"
echo "IS_CYGWIN = $is_cygwin"
AM_CONDITIONAL(IS_CYGWIN, test "x$is_cygwin" = "xyes")
#
+
+ AC_CHECK_LIB(png,png_create_read_struct)
+ AC_CHECK_LIB(freetype,FT_Init_FreeType)
+
+ # took this check from configure.ac distributed with OGLFT 0.7
+ AC_CHECK_HEADER(ft2build.h,,
+ AC_MSG_WARN([could not successfully compile with FreeType2 using the])
+ AC_MSG_WARN([default compiler flags; re-trying with])
+ AC_MSG_WARN([CPPFLAGS=$CPPFLAGS -I/usr/include/freetype2])
+ CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2"
+ unset ac_cv_header_ft2build_h
+ AC_CHECK_HEADER(ft2build.h,,
+ AC_MSG_ERROR([could not find FreeType2 headers]))
+ )
+
if test "x$is_cygwin" = "xyes" ; then
AC_DEFINE(IS_CYGWIN)
AC_CHECK_PROG(have_fltk_config,fltk-config,"yes","no")
if test "x$have_fltk_config" = "xyes" ; then
***************
*** 45,49 ****
#punt and cross our fingers
LIBS="$LIBS -Wl,-e,_mainCRTStartup -L/usr/local/lib -lfltk_gl -lfltk -mwindows -lglu32 -lopengl32 -lole32 -luuid -lcomctl32 -lwsock32 -lm"
! CXXFLAGS="$CXXFLAGS -I/usr/local/include -mwindows -DWIN32"
fi
echo $LIBS
--- 60,64 ----
#punt and cross our fingers
LIBS="$LIBS -Wl,-e,_mainCRTStartup -L/usr/local/lib -lfltk_gl -lfltk -mwindows -lglu32 -lopengl32 -lole32 -luuid -lcomctl32 -lwsock32 -lm"
! CXXFLAGS="$CXXFLAGS -DWIN32"
fi
echo $LIBS
***************
*** 52,61 ****
AC_CHECK_LIB(GL, glNewList)
AC_CHECK_LIB(GLU, gluGetString)
- AC_CHECK_LIB(freetype,FT_Init_FreeType)
AC_CHECK_LIB(fltk,fl_yes)
AC_CHECK_LIB(fltk_gl,fl_visual)
AC_CHECK_HEADER(FL/Fl.h)
AC_CHECK_HEADER(FL/gl.h)
! CXXFLAGS="$CXXFLAGS -I/usr/include/freetype2"
fi
--- 67,75 ----
AC_CHECK_LIB(GL, glNewList)
AC_CHECK_LIB(GLU, gluGetString)
AC_CHECK_LIB(fltk,fl_yes)
AC_CHECK_LIB(fltk_gl,fl_visual)
AC_CHECK_HEADER(FL/Fl.h)
AC_CHECK_HEADER(FL/gl.h)
! #CXXFLAGS="$CXXFLAGS -I/usr/include/freetype2"
fi
|
|
From: Tony P. <ap...@us...> - 2002-07-03 14:56:30
|
Update of /cvsroot/thplot/thplot/tests In directory usw-pr-cvs1:/tmp/cvs-serv28741/tests Modified Files: Makefile.am Log Message: Removed pstest. Index: Makefile.am =================================================================== RCS file: /cvsroot/thplot/thplot/tests/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 30 Jun 2002 14:32:38 -0000 1.2 --- Makefile.am 3 Jul 2002 14:56:27 -0000 1.3 *************** *** 1,3 **** ! noinst_PROGRAMS = csvTest astest pstest csvTest_SOURCES = csvTest.cpp --- 1,3 ---- ! noinst_PROGRAMS = csvTest astest csvTest_SOURCES = csvTest.cpp *************** *** 8,16 **** astest_LDADD = @top_srcdir@/src/Util/libUtil.a - - pstest_SOURCES = pstest.cpp - - pstest_LDADD = @top_srcdir@/src/Gui/libGui.a \ - @top_srcdir@/src/Data/libData.a INCLUDES = -I@top_srcdir@/src --- 8,11 ---- |
|
From: Tony P. <ap...@us...> - 2002-07-03 14:56:04
|
Update of /cvsroot/thplot/thplot/src/Draw
In directory usw-pr-cvs1:/tmp/cvs-serv28368/src/Draw
Modified Files:
Axis.cpp
Log Message:
Improved formatting of numeric tick labels.
Index: Axis.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Draw/Axis.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Axis.cpp 3 Jul 2002 13:23:40 -0000 1.4
--- Axis.cpp 3 Jul 2002 14:56:01 -0000 1.5
***************
*** 130,142 ****
if(labelson) {
char tmp[80];
double value;
if(!vertical){
value = min;
for(i=0;i<=length;i+=20) {
! snprintf(tmp,80,"%g",value);
tickFont->setHorizontalJustification(OGLFT::Face::CENTER);
tickFont->setVerticalJustification(OGLFT::Face::TOP);
tickFont->draw( parent->getX()+i,
! parent->getY()-hashLength-2,
tmp );
value += 2*delta;
--- 130,155 ----
if(labelson) {
char tmp[80];
+ char fmt[10];
+ int mag = int( log10(fabs(delta)) );
+ if( mag < 0 ) {
+ if( mag > -6 ) {
+ mag = abs(mag);
+ snprintf(fmt,10,"%%%d.%df",mag+3,mag);
+ } else {
+ snprintf(fmt,10,"%%3.1E");
+ }
+ } else {
+ snprintf(fmt,10,"%%g");
+ }
+ cout << fmt << endl;
double value;
if(!vertical){
value = min;
for(i=0;i<=length;i+=20) {
! snprintf(tmp,80,fmt,value);
tickFont->setHorizontalJustification(OGLFT::Face::CENTER);
tickFont->setVerticalJustification(OGLFT::Face::TOP);
tickFont->draw( parent->getX()+i,
! parent->getY()-hashLength-1,
tmp );
value += 2*delta;
***************
*** 145,152 ****
value = min;
for(i=0;i<=length;i+=20) {
! snprintf(tmp,80,"%g",value);
tickFont->setVerticalJustification(OGLFT::Face::MIDDLE);
tickFont->setHorizontalJustification(OGLFT::Face::RIGHT);
! tickFont->draw( parent->getX()-hashLength-5,
parent->getY()+i,
tmp );
--- 158,165 ----
value = min;
for(i=0;i<=length;i+=20) {
! snprintf(tmp,80,fmt,value);
tickFont->setVerticalJustification(OGLFT::Face::MIDDLE);
tickFont->setHorizontalJustification(OGLFT::Face::RIGHT);
! tickFont->draw( parent->getX()-hashLength-1,
parent->getY()+i,
tmp );
|
|
From: Tony P. <ap...@us...> - 2002-07-03 13:33:00
|
Update of /cvsroot/thplot/thplot/src/Gui
In directory usw-pr-cvs1:/tmp/cvs-serv27319/src/Gui
Modified Files:
MainWindow.cpp MainWindow.h
Log Message:
Temporary fix for directory open bug, open parameter select dialog automatically after a file is opened.
Index: MainWindow.cpp
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Gui/MainWindow.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** MainWindow.cpp 2 Jul 2002 17:20:42 -0000 1.2
--- MainWindow.cpp 3 Jul 2002 13:32:56 -0000 1.3
***************
*** 28,33 ****
--- 28,37 ----
#include <iostream>
+ #include <FL/filename.H>
+
#include <Gui/MainWindow.h>
+
+
MainWindow::MainWindow(Globals *g, int argc, char **argv) {
global=g;
***************
*** 68,91 ****
while(flc->shown()) Fl::wait();
if(flc->value()){
! glw->getPlot()->getGrid(0)->clearData();
! delete csvdata;
! csvdata = new csvData(global,flc->value());
}
}
void MainWindow::param_select_cb(Fl_Widget* flw) {
! //cout << data << endl;
! if(csvdata) {
! ps = new ParameterSelect(global);
! ps->showDialog(csvdata);
! if( ps->selectionAvailable() ) {
! cout << "Calling setData()" << endl;
! glw->getPlot()->getGrid(0)->setData(csvdata,
! ps->getSelectedIndependent(),
! ps->getSelectedDependents() );
! Fl::redraw();
! }
! delete ps;
! }
}
--- 72,86 ----
while(flc->shown()) Fl::wait();
if(flc->value()){
! if( fl_filename_match( flc->value(),"*.csv") ) {
! glw->getPlot()->getGrid(0)->clearData();
! delete csvdata;
! csvdata = new csvData(global,flc->value());
! doParameterSelect();
! }
}
}
void MainWindow::param_select_cb(Fl_Widget* flw) {
! doParameterSelect();
}
***************
*** 112,113 ****
--- 107,122 ----
}
+ void MainWindow::doParameterSelect(void){
+ if(csvdata) {
+ ps = new ParameterSelect(global);
+ ps->showDialog(csvdata);
+ if( ps->selectionAvailable() ) {
+ cout << "Calling setData()" << endl;
+ glw->getPlot()->getGrid(0)->setData(csvdata,
+ ps->getSelectedIndependent(),
+ ps->getSelectedDependents() );
+ Fl::redraw();
+ }
+ delete ps;
+ }
+ }
Index: MainWindow.h
===================================================================
RCS file: /cvsroot/thplot/thplot/src/Gui/MainWindow.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** MainWindow.h 22 Jun 2002 11:57:08 -0000 1.1.1.1
--- MainWindow.h 3 Jul 2002 13:32:57 -0000 1.2
***************
*** 73,76 ****
--- 73,77 ----
void defineMenu(void);
+ void doParameterSelect(void);
};
|