Compare commits
66 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cf5a19464 | ||
|
|
c5de7eac33 | ||
|
|
793eedfb94 | ||
|
|
ad1c56ee86 | ||
|
|
3a2fe6fec3 | ||
|
|
5242e1e862 | ||
|
|
cd6e5c6a4f | ||
|
|
634bf4e5a1 | ||
|
|
1a00d7f33a | ||
|
|
13e37e792c | ||
|
|
bffe9da0f6 | ||
|
|
8adb153769 | ||
|
|
8b9b6aefb1 | ||
|
|
e68a242d68 | ||
|
|
7dbe7bed5c | ||
|
|
e6e5ba01a4 | ||
|
|
9b42115fb3 | ||
|
|
8260fed1a7 | ||
|
|
d08c89f7c5 | ||
|
|
805e32651d | ||
|
|
f3907fedbf | ||
|
|
a315166098 | ||
|
|
4ee8b6b4bb | ||
|
|
190a6803a5 | ||
|
|
919fbf6d9a | ||
|
|
eea52948a7 | ||
|
|
cb942a7e20 | ||
|
|
5a86447048 | ||
|
|
565726a833 | ||
|
|
31298558b9 | ||
|
|
c0b2ae0824 | ||
|
|
107dacf61d | ||
|
|
1d3911af36 | ||
|
|
c9bfaddcca | ||
|
|
39b420e17d | ||
|
|
58ec630122 | ||
|
|
4caf7bea9a | ||
|
|
83c1ee0ea0 | ||
|
|
f9d723acad | ||
|
|
369bd567c3 | ||
|
|
62fc6956ce | ||
|
|
031d702d71 | ||
|
|
eb3bc157f4 | ||
|
|
87c6977fb7 | ||
|
|
360a21fe03 | ||
|
|
74114d8c2a | ||
|
|
30ac561bcb | ||
|
|
2a08a5416d | ||
|
|
b9e2ff5e8c | ||
|
|
70a58bbed2 | ||
|
|
4c1ec64e9f | ||
|
|
7b80c0dfe3 | ||
|
|
14c644dbfe | ||
|
|
ea5a105d62 | ||
|
|
5183450b27 | ||
|
|
c3f9d5f38f | ||
|
|
72bc036213 | ||
|
|
d81065bf9a | ||
|
|
c27bdbbd94 | ||
|
|
4420616135 | ||
|
|
26d8462016 | ||
|
|
98f4b43dbb | ||
|
|
f26510a6d1 | ||
|
|
a33e858318 | ||
|
|
12b2d442e5 | ||
|
|
844eb6fd7f |
8 changed files with 1 additions and 835 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
|
@ -1,13 +0,0 @@
|
|||
/3Depict-0.0.2.tar.gz
|
||||
/3Depict-0.0.3.tar.gz
|
||||
/3Depict-0.0.6.tar.gz
|
||||
/3Depict-0.0.7.tar.gz
|
||||
/3Depict-0.0.8.tar.gz
|
||||
/3Depict-0.0.9.tar.gz
|
||||
/3Depict-0.0.10.tar.gz
|
||||
/3Depict-0.0.11.tar.gz
|
||||
/3Depict-0.0.12.tar.gz
|
||||
/3Depict-0.0.13.tar.gz
|
||||
/3Depict-0.0.14.tar.gz
|
||||
/3Depict-0.0.15.tar.gz
|
||||
/3Depict-0.0.16.tar.gz
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
diff -r 1b997a96b779 src/wxcomponents.cpp
|
||||
--- src/wx/wxcomponents.cpp Sat Mar 23 17:50:44 2013 +0000
|
||||
+++ src/wx/wxcomponents.cpp Sat Mar 23 17:56:14 2013 +0000
|
||||
@@ -857,16 +857,17 @@
|
||||
//(Oh look Ma, I'm autoconf!)
|
||||
|
||||
const char *dirs[] = { ".",
|
||||
- "/usr/share/fonts/truetype", //Old debian
|
||||
+ "/usr/local/share/fonts/truetype", // User fonts
|
||||
"/usr/share/fonts/truetype/freefont", // New debian
|
||||
"/usr/share/fonts/truetype/ttf-dejavu", //New debian
|
||||
- "/usr/local/share/fonts/truetype", // User fonts
|
||||
+ "/usr/share/fonts/truetype", //Old debian
|
||||
+ "/usr/share/fonts/dejavu", //Fedora
|
||||
"/usr/X11R6/lib/X11/fonts/truetype",
|
||||
"/usr/X11R6/lib64/X11/fonts/truetype",
|
||||
- "/usr/lib/X11/fonts/truetype",// Fedora 32
|
||||
- "/usr/lib64/X11/fonts/truetype", //Fedora 64
|
||||
- "/usr/local/lib/X11/fonts/truetype", // Fedora 32 new
|
||||
- "/usr/local/lib64/X11/fonts/truetype",// Fedora 64 new
|
||||
+ "/usr/lib/X11/fonts/truetype",
|
||||
+ "/usr/lib64/X11/fonts/truetype",
|
||||
+ "/usr/local/lib/X11/fonts/truetype",
|
||||
+ "/usr/local/lib64/X11/fonts/truetype",
|
||||
"",
|
||||
}; //MUST end with "".
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff -r 1b997a96b779 src/gui/mainFrame.cpp
|
||||
--- src/gui/mainFrame.cpp Sat Mar 23 17:50:44 2013 +0000
|
||||
+++ src/gui/mainFrame.cpp Sat Mar 23 17:56:36 2013 +0000
|
||||
@@ -2546,9 +2546,9 @@
|
||||
string s;
|
||||
s=locateDataFile("3Depict-manual.pdf");
|
||||
|
||||
- //Also Debian makes us use the lowercase "D", so check there too.
|
||||
- if(!s.size())
|
||||
- s=locateDataFile("3depict-manual.pdf");
|
||||
+ //Also Fedora has diff dir
|
||||
+ if(!wxFileExists(wxStr(s)))
|
||||
+ s="/usr/share/doc/3Depict-0.0.8/3Depict-0.0.8-manual.pdf";
|
||||
|
||||
|
||||
//If we found it, use the default program associated with that data file
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
diff -r 084988518fe8 src/common/basics.cpp
|
||||
--- src/common/basics.cpp Sat Apr 26 09:27:35 2014 -0400
|
||||
+++ src/common/basics.cpp Sat Apr 26 09:42:07 2014 -0400
|
||||
@@ -1115,6 +1115,28 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+//FIXME: Why negative?
|
||||
+bool isNotDirectory(const char *filename)
|
||||
+{
|
||||
+#if !defined(__WIN32__) && !defined(__WIN64__)
|
||||
+ struct stat statbuf;
|
||||
+
|
||||
+ if(stat(filename,&statbuf) == -1)
|
||||
+ return false;
|
||||
+
|
||||
+ return (statbuf.st_mode !=S_IFDIR);
|
||||
+#else
|
||||
+
|
||||
+ WARN(false, "Untested function. calling win api");
|
||||
+ DWORD fileAttribs;
|
||||
+ fileAttribs=GetFileAttributes((LPCWSTR)filename);
|
||||
+ if(fileAttribs == INVALID_FILE_ATTRIBUTES)
|
||||
+ return false;
|
||||
+
|
||||
+ return !(fileAttribs & FILE_ATTRIBUTE_DIRECTORY);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
#ifdef DEBUG
|
||||
bool isValidXML(const char *filename)
|
||||
{
|
||||
@@ -1148,27 +1170,6 @@
|
||||
}
|
||||
|
||||
|
||||
-//FIXME: Why negative?
|
||||
-bool isNotDirectory(const char *filename)
|
||||
-{
|
||||
-#if !defined(__WIN32__) && !defined(__WIN64__)
|
||||
- struct stat statbuf;
|
||||
-
|
||||
- if(stat(filename,&statbuf) == -1)
|
||||
- return false;
|
||||
-
|
||||
- return (statbuf.st_mode !=S_IFDIR);
|
||||
-#else
|
||||
-
|
||||
- WARN(false, "Untested function. calling win api");
|
||||
- DWORD fileAttribs;
|
||||
- fileAttribs=GetFileAttributes((LPCWSTR)filename);
|
||||
- if(fileAttribs == INVALID_FILE_ATTRIBUTES)
|
||||
- return false;
|
||||
-
|
||||
- return !(fileAttribs & FILE_ATTRIBUTE_DIRECTORY);
|
||||
-#endif
|
||||
-}
|
||||
|
||||
bool rmFile(const std::string &filename)
|
||||
{
|
||||
|
|
@ -1,497 +0,0 @@
|
|||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/backend/plot.cpp
|
||||
--- src/backend/plot.cpp Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/backend/plot.cpp Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -47,118 +47,8 @@
|
||||
// perform a little "push off" by this fudge factor
|
||||
const float AXIS_MIN_TOLERANCE=10*sqrtf(std::numeric_limits<float>::epsilon());
|
||||
|
||||
-int MGLColourFixer::maxCols=-1;
|
||||
+const unsigned int MGL_RESERVED_COLOURS=2;
|
||||
|
||||
-void MGLColourFixer::reset()
|
||||
-{
|
||||
- rs.clear();
|
||||
- gs.clear();
|
||||
- bs.clear();
|
||||
-}
|
||||
-
|
||||
-char MGLColourFixer::haveExactColour(float r, float g, float b) const
|
||||
-{
|
||||
- ASSERT(rs.size() == gs.size())
|
||||
- ASSERT(gs.size() == bs.size())
|
||||
-
|
||||
- ASSERT(rs.size() <=getMaxColours());
|
||||
-
|
||||
- for(unsigned int ui=0; ui<rs.size(); ui++)
|
||||
- {
|
||||
- if( fabs(r-rs[ui]) <std::numeric_limits<float>::epsilon()
|
||||
- && fabs(g-gs[ui]) <std::numeric_limits<float>::epsilon()
|
||||
- && fabs(b-bs[ui]) <std::numeric_limits<float>::epsilon())
|
||||
- return mglColorIds[ui+1].id; //Add one to offset to avoid the reserved "k"
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-unsigned int MGLColourFixer::getMaxColours()
|
||||
-{
|
||||
- //Used cached value if available
|
||||
- if(maxCols!=-1)
|
||||
- return maxCols;
|
||||
-
|
||||
- //The array is statically defined in
|
||||
- //mgl/mgl_main.cpp, and must end with an id of zero.
|
||||
- //
|
||||
- //this is not documented at all.
|
||||
- maxCols=0;
|
||||
- while(mglColorIds[maxCols].id)
|
||||
- maxCols++;
|
||||
-
|
||||
- return maxCols;
|
||||
-}
|
||||
-
|
||||
-char MGLColourFixer::getNextBestColour(float r, float g, float b)
|
||||
-{
|
||||
- ASSERT(rs.size() == gs.size());
|
||||
- ASSERT(gs.size() == bs.size());
|
||||
-
|
||||
-
|
||||
- //As a special case, mgl has its own black
|
||||
- if(r == 0.0f && g == 0.0f && b == 0.0f)
|
||||
- return mglColorIds[0].id;
|
||||
-
|
||||
-
|
||||
- unsigned int best=0;
|
||||
- if(rs.size() == getMaxColours())
|
||||
- {
|
||||
- ASSERT(getMaxColours());
|
||||
- //Looks like we ran out of palette colours.
|
||||
- //lets just give up and try to match this against our existing colours
|
||||
-
|
||||
- //TODO: let this modify the existing palette
|
||||
- // to find a better match.
|
||||
- float distanceSqr=std::numeric_limits<float>::max();
|
||||
- for(unsigned int ui=0; ui<rs.size(); ui++)
|
||||
- {
|
||||
- float distanceTmp;
|
||||
- if(r <= 0.5)
|
||||
- {
|
||||
- //3,4,2 weighted euclidean distance. Weights allow for closer human perception
|
||||
- distanceTmp= 3.0*(rs[ui] - r )*(rs[ui] - r ) +4.0*(gs[ui] - g )*(gs[ui] - g )
|
||||
- + 2.0*(bs[ui] - b )*(bs[ui] - b );
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- //use alternate weighting for closer colour perception in "non-red" half of colour cube
|
||||
- distanceTmp= 2.0*(rs[ui] - r )*(rs[ui] - r ) +4.0*(gs[ui] - g )*(gs[ui] - g )
|
||||
- + 3.0*(bs[ui] - b )*(bs[ui] - b );
|
||||
- }
|
||||
-
|
||||
- if(distanceTmp < distanceSqr)
|
||||
- {
|
||||
- distanceSqr = (distanceTmp);
|
||||
- best=ui+1; //offset by 1 because mathgl colour 0 is special
|
||||
- }
|
||||
-
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- char exactMatch;
|
||||
- //Check to see if we don't already have this
|
||||
- // no use wasting palette positions on existing
|
||||
- // colours
|
||||
- exactMatch=haveExactColour(r,g,b);
|
||||
-
|
||||
- if(exactMatch)
|
||||
- return exactMatch;
|
||||
-
|
||||
- //Offset zero is special, for black things, like axes
|
||||
- best=rs.size()+1;
|
||||
- mglColorIds[best].col = mglColor(r,g,b);
|
||||
-
|
||||
- rs.push_back(r);
|
||||
- gs.push_back(g);
|
||||
- bs.push_back(b);
|
||||
- }
|
||||
-
|
||||
- ASSERT(mglColorIds[best].id != 'k');
|
||||
- return mglColorIds[best].id;
|
||||
-}
|
||||
|
||||
//Mathgl uses some internal for(float=...) constructions,
|
||||
// which are just generally a bad idea, as they often won't terminate
|
||||
@@ -209,6 +99,18 @@
|
||||
}
|
||||
|
||||
|
||||
+std::string mglColourCode(float r, float g, float b)
|
||||
+{
|
||||
+ ASSERT(r >=0.0f && g >=0.0f && b >=0.0f)
|
||||
+ ASSERT(r <=255.0f && g <=255.0f && b <=255.0f)
|
||||
+ std::string s;
|
||||
+ genColString((unsigned char)(r*255),
|
||||
+ (unsigned char)(g*255),(unsigned char)(b*255),s);
|
||||
+ s=s.substr(1);
|
||||
+
|
||||
+ return string("{x") + uppercase(s) + string("}");
|
||||
+}
|
||||
+
|
||||
//TODO: Refactor these functions to use a common string map
|
||||
//-----------
|
||||
string plotString(unsigned int traceType)
|
||||
@@ -806,7 +708,6 @@
|
||||
}
|
||||
|
||||
//Un-fudger for mathgl plots
|
||||
- MGLColourFixer colourFixer;
|
||||
|
||||
bool haveMultiTitles=false;
|
||||
float minX,maxX,minY,maxY;
|
||||
@@ -994,17 +895,15 @@
|
||||
if(!curPlot->visible)
|
||||
continue;
|
||||
|
||||
- curPlot->drawRegions(gr,colourFixer,min,max);
|
||||
- curPlot->drawPlot(gr,colourFixer);
|
||||
+ curPlot->drawRegions(gr,min,max);
|
||||
+ curPlot->drawPlot(gr);
|
||||
|
||||
if(drawLegend)
|
||||
{
|
||||
//Fake an mgl colour code
|
||||
- char colourCode[2];
|
||||
- colourCode[0]=colourFixer.getNextBestColour(
|
||||
- curPlot->r,curPlot->g,curPlot->b);
|
||||
- colourCode[1]='\0';
|
||||
- gr->AddLegend(curPlot->title.c_str(),colourCode);
|
||||
+ std::string mglColStr;
|
||||
+ mglColStr= mglColourCode(curPlot->r,curPlot->g,curPlot->b);
|
||||
+ gr->AddLegend(curPlot->title.c_str(),mglColStr.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,7 +916,7 @@
|
||||
vector<pair<size_t,size_t> > overlapId;
|
||||
vector<pair<float,float> > overlapXCoords;
|
||||
|
||||
- char colourCode=colourFixer.getNextBestColour(1.0f,0.0f,0.0f);
|
||||
+ string colourCode=mglColourCode(1.0f,0.0f,0.0f);
|
||||
getRegionOverlaps(overlapId,overlapXCoords);
|
||||
|
||||
float rMinY,rMaxY;
|
||||
@@ -1045,10 +944,10 @@
|
||||
|
||||
#ifdef USE_MGL2
|
||||
gr->FaceZ(mglPoint(rMinX,rMinY,-1),rMaxX-rMinX,rMaxY-rMinY,
|
||||
- &colourCode);
|
||||
+ colourCode.c_str());
|
||||
#else
|
||||
gr->FaceZ(rMinX,rMinY,-1,rMaxX-rMinX,rMaxY-rMinY,
|
||||
- &colourCode);
|
||||
+ colourCode.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1082,7 +981,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
- overlays.draw(gr,colourFixer,min,max,haveUsedLog);
|
||||
+ overlays.draw(gr,min,max,haveUsedLog);
|
||||
}
|
||||
|
||||
void PlotWrapper::hideAll()
|
||||
@@ -1405,7 +1304,7 @@
|
||||
return xValues.empty();
|
||||
}
|
||||
|
||||
-void Plot1D::drawPlot(mglGraph *gr,MGLColourFixer &fixer) const
|
||||
+void Plot1D::drawPlot(mglGraph *gr) const
|
||||
{
|
||||
bool showErrs;
|
||||
|
||||
@@ -1453,9 +1352,8 @@
|
||||
|
||||
//Obtain a colour code to use for the plot, based upon
|
||||
// the actual colour we wish to use
|
||||
- char colourCode[2];
|
||||
- colourCode[0]=fixer.getNextBestColour(r,g,b);
|
||||
- colourCode[1]='\0';
|
||||
+ string colourCode;
|
||||
+ colourCode=mglColourCode(r,g,b);
|
||||
//---
|
||||
|
||||
|
||||
@@ -1467,23 +1365,23 @@
|
||||
//rather than linear interpolating them back along their paths. I have emailed the author.
|
||||
//for now, we shall have to put up with missing lines :( Absolute worst case, I may have to draw them myself.
|
||||
gr->SetCut(true);
|
||||
-
|
||||
- gr->Plot(xDat,yDat,colourCode);
|
||||
+
|
||||
+ gr->Plot(xDat,yDat,colourCode.c_str());
|
||||
if(showErrs)
|
||||
- gr->Error(xDat,yDat,eDat,colourCode);
|
||||
+ gr->Error(xDat,yDat,eDat,colourCode.c_str());
|
||||
gr->SetCut(false);
|
||||
break;
|
||||
case PLOT_TRACE_BARS:
|
||||
- gr->Bars(xDat,yDat,colourCode);
|
||||
+ gr->Bars(xDat,yDat,colourCode.c_str());
|
||||
break;
|
||||
case PLOT_TRACE_STEPS:
|
||||
//Same problem as for line plot.
|
||||
gr->SetCut(true);
|
||||
- gr->Step(xDat,yDat,colourCode);
|
||||
+ gr->Step(xDat,yDat,colourCode.c_str());
|
||||
gr->SetCut(false);
|
||||
break;
|
||||
case PLOT_TRACE_STEM:
|
||||
- gr->Stem(xDat,yDat,colourCode);
|
||||
+ gr->Stem(xDat,yDat,colourCode.c_str());
|
||||
break;
|
||||
|
||||
case PLOT_TRACE_POINTS:
|
||||
@@ -1557,13 +1455,11 @@
|
||||
regionGroup.clear();
|
||||
}
|
||||
|
||||
-void Plot1D::drawRegions(mglGraph *gr,MGLColourFixer &fixer,
|
||||
+void Plot1D::drawRegions(mglGraph *gr,
|
||||
const mglPoint &min,const mglPoint &max) const
|
||||
{
|
||||
//Mathgl palette colour name
|
||||
- char colourCode[2];
|
||||
- colourCode[1]='\0';
|
||||
-
|
||||
+ string colourCode;
|
||||
|
||||
for(unsigned int uj=0;uj<regionGroup.regions.size();uj++)
|
||||
{
|
||||
@@ -1577,16 +1473,15 @@
|
||||
//Prevent drawing inverted regionGroup.regions
|
||||
if(rMaxX > rMinX && rMaxY > rMinY)
|
||||
{
|
||||
- colourCode[0] = fixer.getNextBestColour(regionGroup.regions[uj].r,
|
||||
+ colourCode = mglColourCode(regionGroup.regions[uj].r,
|
||||
regionGroup.regions[uj].g,
|
||||
regionGroup.regions[uj].b);
|
||||
- colourCode[1] = '\0';
|
||||
#ifdef USE_MGL2
|
||||
gr->FaceZ(mglPoint(rMinX,rMinY,-1),rMaxX-rMinX,rMaxY-rMinY,
|
||||
- colourCode);
|
||||
+ colourCode.c_str());
|
||||
#else
|
||||
gr->FaceZ(rMinX,rMinY,-1,rMaxX-rMinX,rMaxY-rMinY,
|
||||
- colourCode);
|
||||
+ colourCode.c_str());
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -1791,18 +1686,17 @@
|
||||
}
|
||||
|
||||
|
||||
-void PlotOverlays::draw(mglGraph *gr,MGLColourFixer &fixer,
|
||||
+void PlotOverlays::draw(mglGraph *gr,
|
||||
const mglPoint &boundMin, const mglPoint &boundMax,bool logMode ) const
|
||||
{
|
||||
|
||||
if(!isEnabled)
|
||||
return;
|
||||
|
||||
- char colourCode[2];
|
||||
+ string colourCode;
|
||||
|
||||
//Draw the overlays in black
|
||||
- colourCode[0] = fixer.getNextBestColour(0.0,0.0,0.0);
|
||||
- colourCode[1]='\0';
|
||||
+ colourCode = mglColourCode(0.0,0.0,0.0);
|
||||
|
||||
for(size_t ui=0;ui<overlayData.size();ui++)
|
||||
{
|
||||
@@ -1841,6 +1735,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ //TODO: Deprecate me. Upstream now allows single stems
|
||||
//Draw stems. can't use stem plot due to mathgl bug whereby single stems
|
||||
// will not be drawn
|
||||
for(size_t uj=0;uj<overlayData[ui].coordData.size();uj++)
|
||||
@@ -1849,7 +1744,7 @@
|
||||
boundMin.y < bufY[uj])
|
||||
{
|
||||
gr->Line (mglPoint(bufX[uj],std::max(0.0f,(float)boundMin.y)),
|
||||
- mglPoint(bufX[uj],bufY[uj]),colourCode,100);
|
||||
+ mglPoint(bufX[uj],bufY[uj]),colourCode.c_str(),100);
|
||||
|
||||
//Print labels near to the text
|
||||
const float STANDOFF_FACTOR=1.05;
|
||||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/backend/plot.h
|
||||
--- src/backend/plot.h Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/backend/plot.h Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -64,26 +64,6 @@
|
||||
//!Return the error mode type, given the human readable string
|
||||
unsigned int plotErrmodeID(const std::string &s);
|
||||
|
||||
-//!Nasty hack class to change mathgl API from named char palette to rgb specification
|
||||
-class MGLColourFixer
|
||||
-{
|
||||
- private:
|
||||
- vector<float> rs,gs,bs;
|
||||
- static int maxCols;
|
||||
- public:
|
||||
- //Restore the MGL colour strings
|
||||
- void reset();
|
||||
- //Return the exact colour, if there is one
|
||||
- char haveExactColour(float r, float g, float b) const;
|
||||
- //Get the best colour that is available
|
||||
- // returns the char to give to mathgl; may be exact,
|
||||
- // maybe nearest match, depending upon number of colours used
|
||||
- // and mgl palette size
|
||||
- char getNextBestColour(float r, float g, float b);
|
||||
-
|
||||
- static unsigned int getMaxColours();
|
||||
-};
|
||||
-
|
||||
|
||||
//!Data class for holding info about non-overlapping
|
||||
// interactive rectilinear "zones" overlaid on plots
|
||||
@@ -199,7 +179,7 @@
|
||||
//Add a new overlay to the plot
|
||||
void add(const OVERLAY_DATA &overlay) {overlayData.push_back(overlay);}
|
||||
//Draw the overlay on the current plot
|
||||
- void draw(mglGraph *g,MGLColourFixer &fixer,
|
||||
+ void draw(mglGraph *g,
|
||||
const mglPoint &boundMin, const mglPoint &boundMax,bool logMode) const;
|
||||
//Enable the specified overlay
|
||||
void setEnabled(size_t offset,bool isEnabled)
|
||||
@@ -262,7 +242,7 @@
|
||||
virtual bool empty() const=0;
|
||||
|
||||
//Draw the plot onto a given MGL graph
|
||||
- virtual void drawPlot(mglGraph *graph, MGLColourFixer &fixer) const=0;
|
||||
+ virtual void drawPlot(mglGraph *graph) const=0;
|
||||
|
||||
//!Scan for the data bounds.
|
||||
virtual void getBounds(float &xMin,float &xMax,
|
||||
@@ -309,11 +289,10 @@
|
||||
|
||||
|
||||
//Draw the plot onto a given MGL graph
|
||||
- virtual void drawPlot(mglGraph *graph,MGLColourFixer &fixer) const;
|
||||
+ virtual void drawPlot(mglGraph *graph) const;
|
||||
|
||||
//Draw the associated regions
|
||||
- void drawRegions(mglGraph *graph, MGLColourFixer &fixer,
|
||||
- const mglPoint &min, const mglPoint &max) const;
|
||||
+ void drawRegions(mglGraph *graph,const mglPoint &min, const mglPoint &max) const;
|
||||
|
||||
|
||||
//!Retrieve the raw data associated with the currently visible plots.
|
||||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/common/stringFuncs.cpp
|
||||
--- src/common/stringFuncs.cpp Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/common/stringFuncs.cpp Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -457,6 +457,16 @@
|
||||
return s;
|
||||
}
|
||||
|
||||
+std::string uppercase(std::string s)
|
||||
+{
|
||||
+ for(unsigned int ui=0;ui<s.size();ui++)
|
||||
+ {
|
||||
+ if(isascii(s[ui]) && islower(s[ui]))
|
||||
+ s[ui] = toupper(s[ui]);
|
||||
+ }
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
//Split strings around a delimiter
|
||||
void splitStrsRef(const char *cpStr, const char delim,std::vector<string> &v )
|
||||
{
|
||||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/common/stringFuncs.h
|
||||
--- src/common/stringFuncs.h Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/common/stringFuncs.h Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -61,6 +61,8 @@
|
||||
std::string stripChars(const std::string &Str, const char *chars);
|
||||
//!Return a lowercase version for a given string
|
||||
std::string lowercase(std::string s);
|
||||
+//!Return a uppercase version for a given string
|
||||
+std::string uppercase(std::string s);
|
||||
|
||||
//Drop empty entries from a string of vector
|
||||
void stripZeroEntries(std::vector<std::string> &s);
|
||||
@@ -71,9 +73,11 @@
|
||||
unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a);
|
||||
|
||||
//Convert an RGBA 8-bit/channel quadruplet into its hexadecimal colour string
|
||||
+// format is "#rrggbbaa" such as "#11ee00aa"
|
||||
void genColString(unsigned char r, unsigned char g,
|
||||
unsigned char b, unsigned char a, std::string &s);
|
||||
//Convert an RGB 8-bit/channel quadruplet into its hexadecimal colour string
|
||||
+// format is "#rrggbb" such as "#11ee00"
|
||||
void genColString(unsigned char r, unsigned char g,
|
||||
unsigned char b, std::string &s);
|
||||
|
||||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/gui/dialogs/rangeEditDialog.cpp
|
||||
--- src/gui/dialogs/rangeEditDialog.cpp Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/gui/dialogs/rangeEditDialog.cpp Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -288,7 +288,7 @@
|
||||
EVT_CHECKLISTBOX(ID_LIST_OVERLAY, RangeEditorDialog::OnListOverlayCheck)
|
||||
EVT_BUTTON(wxID_OK, RangeEditorDialog::OnBtnOK)
|
||||
EVT_BUTTON(wxID_CANCEL, RangeEditorDialog::OnBtnCancel)
|
||||
- EVT_SPLITTER_UNSPLIT(ID_SPLIT_LEFTRIGHT, RangeEditorDialog::OnSashVerticalUnsplit)
|
||||
+ EVT_SPLITTER_DCLICK(ID_SPLIT_LEFTRIGHT, RangeEditorDialog::OnSashVerticalDClick)
|
||||
// end wxGlade
|
||||
END_EVENT_TABLE();
|
||||
|
||||
@@ -1438,7 +1438,7 @@
|
||||
plotPanel->Refresh();
|
||||
}
|
||||
|
||||
-void RangeEditorDialog::OnSashVerticalUnsplit(wxSplitterEvent &event)
|
||||
+void RangeEditorDialog::OnSashVerticalDClick(wxSplitterEvent &event)
|
||||
{
|
||||
event.Veto();
|
||||
}
|
||||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/gui/dialogs/rangeEditDialog.h
|
||||
--- src/gui/dialogs/rangeEditDialog.h Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/gui/dialogs/rangeEditDialog.h Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -210,7 +210,7 @@
|
||||
virtual void OnCheckShowOverlay(wxCommandEvent &event); // wxGlade: <event_handler>
|
||||
virtual void OnBtnOK(wxCommandEvent &event); // wxGlade: <event_handler>
|
||||
virtual void OnBtnCancel(wxCommandEvent &event); // wxGlade: <event_handler>
|
||||
- virtual void OnSashVerticalUnsplit(wxSplitterEvent &event); // wxGlade: <event_handler>
|
||||
+ virtual void OnSashVerticalDClick(wxSplitterEvent &event); // wxGlade: <event_handler>
|
||||
virtual void OnListOverlayCheck(wxCommandEvent &event);
|
||||
virtual void OnListOverlayKeyDown(wxListEvent &event);
|
||||
virtual void OnTextOverlay(wxCommandEvent &event);
|
||||
diff -r 34e37068b6c7 -r 47f4a1712c25 src/gui/mainFrame.cpp
|
||||
--- src/gui/mainFrame.cpp Thu Apr 17 22:17:56 2014 +0100
|
||||
+++ src/gui/mainFrame.cpp Thu Apr 24 00:06:18 2014 +0100
|
||||
@@ -1143,9 +1143,12 @@
|
||||
f->setRangeData(rng);
|
||||
f->setRangeFilename(s.c_str());
|
||||
|
||||
- //Get the parent filter pointer
|
||||
+ //Add the filter, using the seelcted
|
||||
+ // item as the parent
|
||||
visControl.addFilter(f,false,filterId);
|
||||
|
||||
+ //update the tree control
|
||||
+ visControl.updateWxTreeCtrl(treeFilters);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1398,6 +1401,10 @@
|
||||
}
|
||||
|
||||
setSaveStatus();
|
||||
+
|
||||
+ //make sure camera is properly centred
|
||||
+ if(visControl.numCams() == 1)
|
||||
+ visControl.ensureSceneVisible(3);
|
||||
}
|
||||
|
||||
}
|
||||
221
3Depict.spec
221
3Depict.spec
|
|
@ -1,221 +0,0 @@
|
|||
Name: 3Depict
|
||||
Version: 0.0.16
|
||||
Release: 3%{?dist}
|
||||
Summary: Valued 3D point cloud visualization and analysis
|
||||
Group: Applications/Engineering
|
||||
|
||||
|
||||
License: GPLv3+
|
||||
URL: http://threedepict.sourceforge.net
|
||||
Source0: http://downloads.sourceforge.net/threedepict/%{name}-%{version}.tar.gz
|
||||
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
#Mathgl for plotting
|
||||
BuildRequires: mathgl-devel
|
||||
#Mesa for GLU
|
||||
BuildRequires: libGL-devel
|
||||
#Libxml2 for file parsing
|
||||
BuildRequires: libxml2-devel
|
||||
#FTGL for 3d fonts
|
||||
BuildRequires: ftgl-devel
|
||||
#libpng for textures
|
||||
BuildRequires: libpng-devel
|
||||
#Desktop file utils for installing desktop file
|
||||
BuildRequires: desktop-file-utils
|
||||
#WX widgets
|
||||
BuildRequires: wxGTK-devel
|
||||
#PDF latex build
|
||||
#BuildRequires: tex(latex)
|
||||
|
||||
#Required for surface removal algorithms
|
||||
BuildRequires: qhull-devel
|
||||
|
||||
#Fedora specific PDF dir.
|
||||
Patch0: %{name}-%{version}-manual-pdf-loc.patch
|
||||
#Fedora specific font dir
|
||||
Patch1: %{name}-%{version}-font-path.patch
|
||||
#Upstream patches from 0.0.16 release tarball
|
||||
Patch2: %{name}-0.0.16-upstream.patch
|
||||
#Upstream bug where funciton is dropped in release mode
|
||||
Patch3: %{name}-0.0.16-patch-debug-build.patch
|
||||
|
||||
|
||||
%description
|
||||
This software is designed to help users visualize and analyze 3D point clouds
|
||||
with an associated real value, in a fast and flexible fashion. It is
|
||||
specifically targeted to atom probe tomography applications, but may be
|
||||
useful for general scalar valued point data purposes.
|
||||
|
||||
%prep
|
||||
|
||||
%setup -q
|
||||
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
|
||||
%build
|
||||
%configure --disable-debug-checks --enable-openmp-parallel --enable-mgl2
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
# Install the textures
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}/textures
|
||||
cp -p data/textures/*png %{buildroot}%{_datadir}/%{name}/textures/
|
||||
|
||||
|
||||
#Install the manpage
|
||||
install -Dp -m 644 packaging/manpage/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
||||
|
||||
desktop-file-install \
|
||||
--dir %{buildroot}%{_datadir}/applications \
|
||||
packaging/%{name}.desktop
|
||||
mkdir -p %{buildroot}%{_datadir}/pixmaps/
|
||||
install -Dp -m 644 data/textures/tex-source/%{name}-icon.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
|
||||
|
||||
#install language files
|
||||
#--
|
||||
#Remap locale names
|
||||
mv locales/de_DE/ locales/de/
|
||||
|
||||
mkdir -p %{buildroot}/%{_datadir}/locale/
|
||||
cp -R locales/* %{buildroot}/%{_datadir}/locale/
|
||||
|
||||
#Restore the internal build's locale naming
|
||||
mv locales/de/ locales/de_DE/
|
||||
#--
|
||||
|
||||
|
||||
#Move the documentation such that it is picked up by the doc macro
|
||||
mv docs/manual-latex/manual.pdf %{name}-%{version}-manual.pdf
|
||||
|
||||
#Locale stuff
|
||||
%find_lang %{name}
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING AUTHORS ChangeLog README TODO %{name}-%{version}-manual.pdf
|
||||
%{_bindir}/%{name}
|
||||
%dir %{_datadir}/%{name}/
|
||||
%dir %{_datadir}/%{name}/textures
|
||||
%{_datadir}/%{name}/textures/*.png
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_mandir}/man1/%{name}.1.*
|
||||
%{_datadir}/pixmaps/*.svg
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.16-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.16-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Sat Apr 26 2014 D Haley <mycae(a!t)gmx.com> - 0.0.16-1
|
||||
- Update to 0.0.16
|
||||
|
||||
* Wed Feb 12 2014 D Haley <mycae(a!t)gmx.com> - 0.0.15-4
|
||||
- Rebuild for mgl
|
||||
|
||||
* Wed Feb 05 2014 D Haley <mycae(a!t)gmx.com> - 0.0.15-3
|
||||
- Rebuild for new mgl
|
||||
- Add upstream patches
|
||||
|
||||
* Sun Jan 26 2014 D Haley <mycae(a!t)gmx.com> - 0.0.15-2
|
||||
- Rebuild for new mgl
|
||||
|
||||
* Sun Dec 01 2013 D Haley <mycae(a!t)gmx.com> - 0.0.15-1
|
||||
- Update to 0.0.15
|
||||
|
||||
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.14-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2013 D Haley <mycae(a!t)gmx.com> - 0.0.14-1
|
||||
- Update to 0.0.14
|
||||
|
||||
* Tue Jun 25 2013 D Haley <mycae(a!t)gmx.com> - 0.0.13-2
|
||||
- Enable mathgl2
|
||||
|
||||
* Fri Apr 12 2013 D Haley <mycae(a!t)gmx.com> - 0.0.13-1
|
||||
- Update to 0.0.13
|
||||
|
||||
* Sat Mar 23 2013 D Haley <mycae(a!t)gmx.com> - 0.0.12-4
|
||||
- Add aarch 64 patch for bug 924960, until next version
|
||||
|
||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.12-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Sun Dec 9 2012 D Haley <mycae(a!t)yahoo.com> - 0.0.12-2
|
||||
- Import bugfixes from upstream for plot UI and crash fixes
|
||||
|
||||
* Sun Nov 25 2012 D Haley <mycae(a!t)yahoo.com> - 0.0.12-1
|
||||
- Update to 0.0.12
|
||||
|
||||
* Mon Apr 2 2012 D Haley <mycae(a!t)yahoo.com> - 0.0.10-1
|
||||
- Update to 0.0.10
|
||||
|
||||
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.9-4
|
||||
- Rebuilt for c++ ABI breakage
|
||||
|
||||
* Thu Jan 12 2012 D Haley <mycae(a!t)yahoo.com> - 0.0.9-3
|
||||
- Patch to fix FTFBS for gcc 4.7
|
||||
|
||||
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.9-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Sat Dec 17 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.9-1
|
||||
- Update to 0.0.9
|
||||
|
||||
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.0.8-3
|
||||
- Rebuild for new libpng
|
||||
|
||||
* Sat Oct 29 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.8-2
|
||||
- Post release fixes for various crash bugs
|
||||
|
||||
* Sun Oct 23 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.8-1
|
||||
- Update to 0.0.8
|
||||
|
||||
* Sun Aug 14 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.7-1
|
||||
- Update to 0.0.7
|
||||
|
||||
* Fri May 20 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.6-1
|
||||
- Update to 0.0.6
|
||||
|
||||
* Sun Mar 27 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.5-1
|
||||
- New upstream release
|
||||
|
||||
* Sun Mar 13 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.4-3
|
||||
- Patch opengl startup code -- peek at gl context. Possible fix for bug 684390
|
||||
|
||||
* Sat Feb 12 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.4-2
|
||||
- Fix bug 677016 - 3Depict no built with rpm opt flags
|
||||
|
||||
* Sat Jan 22 2011 D Haley <mycae(a!t)yahoo.com> - 0.0.4-1
|
||||
- Update to 0.0.4
|
||||
|
||||
* Fri Nov 26 2010 D Haley <mycae(a!t)yahoo.com> - 0.0.3-1
|
||||
- Update to 0.0.3
|
||||
|
||||
* Tue Oct 5 2010 D Haley <mycae(a!t)yahoo.com> - 0.0.2-3
|
||||
- Use tex(latex) virtual package in preference to texlive-latex
|
||||
|
||||
* Mon Oct 4 2010 D Haley <mycae(a!t)yahoo.com> - 0.0.2-2
|
||||
- Add latex build for manual
|
||||
|
||||
* Sat Sep 25 2010 D Haley <mycae(a!t)yahoo.com> - 0.0.2-1
|
||||
- Update to 0.0.2
|
||||
- Address comments in package review
|
||||
|
||||
* Sun Aug 08 2010 D Haley <mycae(a!t)yahoo.com> - 0.0.1-1
|
||||
- Initial package
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
Orphaned for 6+ weeks
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
25b52763ae6763f99c4146a3e04db3e1 3Depict-0.0.16.tar.gz
|
||||
Reference in a new issue