ScatterDraw. Removed warnings thanks to coolman

git-svn-id: svn://ultimatepp.org/upp/trunk@13506 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2019-07-23 07:20:38 +00:00
parent fd32610a21
commit f05ceb77db
5 changed files with 8 additions and 35 deletions

View file

@ -391,7 +391,7 @@ private:
int64 numData;
public:
VectorVectorY() : data(0), useRows(true), beginData(0), numData(Null), idx(0), idy(1) {}
VectorVectorY() : data(0), useRows(true), idx(0), idy(1), beginData(0), numData(Null) {}
VectorVectorY(Vector<Vector<Y> > &data, int idx, int idy,
Vector<int> &idsx, Vector<int> &idsy, Vector<int> &idsFixed,
bool useRows = true, int beginData = 0, int numData = Null) {
@ -656,7 +656,8 @@ private:
template <class T>
inline T LinearInterpolate(T x, T x0, T x1, T v0, T v1) {
ASSERT(x1 != x0);
if (x0 == x1)
return (v0 + v1)/T(2);
return ((x1 - x)/(x1 - x0))*v0 + ((x - x0)/(x1 - x0))*v1;
}
@ -674,8 +675,8 @@ inline T TrilinearInterpolate(T x, T y, T z, T x0, T x1, T y0, T y1, T z0, T z1,
T x10 = LinearInterpolate(x, x0, x1, v010, v110);
T x01 = LinearInterpolate(x, x0, x1, v001, v101);
T x11 = LinearInterpolate(x, x0, x1, v011, v111);
T r0 = LinearInterpolate(y, y0, y1, x00, x01);
T r1 = LinearInterpolate(y, y0, y1, x10, x11);
T r0 = LinearInterpolate(y, y0, y1, x00, x01);
T r1 = LinearInterpolate(y, y0, y1, x10, x11);
return LinearInterpolate(z, z0, z1, r0, r1);
}

View file

@ -38,6 +38,7 @@ public:
friend struct Equation_functor;
const Vector<double> &GetCoeff() {return coeff;}
double GetCoeff(int i) {return coeff[i];}
template<class T>
static void Register(const String& name) {

View file

@ -18,23 +18,17 @@ ScatterDraw::ScatterDraw() {
gridColor = SColorDkShadow();
gridWidth = 0.5;
gridDash = LINE_DOTTED_FINE;
//gridColor2 = SColorDkShadow();
//gridWidth2 = 0.5;
//gridDash2 = LINE_DOTTED_FINER;
drawXReticle = drawYReticle = true;
drawY2Reticle = false;
reticleFont = GetStdFont();
reticleColor = Black;
drawVGrid = drawHGrid = showLegend = true;
//drawVGrid2 = drawHGrid2 = true;
//freqGrid2 = 5;
minXRange = maxXRange = minYRange = maxYRange = -1;
minXmin = minYmin = maxXmax = maxYmax = Null;
fastViewX = false;
sequentialXAll = false;
zoomStyleX = zoomStyleY = TO_CENTER;
SetMajorUnitsNum(5, 10);
Color(graphColor);
isPolar = false;
lastxRange = xRange;
lastyRange = yRange;
@ -1005,31 +999,7 @@ const String ScatterDraw::GetUnitsY(int index) {
ASSERT(IsValid(index));
return series[index].unitsY;
}
/*
ScatterDraw& ScatterDraw::SetDataColor(int index, const Color& color) {
ASSERT(IsValid(index));
series[index].color = color;
Refresh();
return *this;
}
Color ScatterDraw::GetDataColor(int index) const {
ASSERT(IsValid(index));
return series[index].color;
}
ScatterDraw& ScatterDraw::SetDataThickness(int index, double thickness) {
ASSERT(IsValid(index));
series[index].thickness = thickness;
Refresh();
return *this;
}
double ScatterDraw::GetDataThickness(int index) const {
ASSERT(IsValid(index));
return series[index].thickness;
}
*/
ScatterDraw& ScatterDraw::SetFillColor(int index, const Color& color) {
ASSERT(IsValid(index));
series[index].fillColor = color;

View file

@ -79,7 +79,7 @@ public:
#define LINE_DOTTED "4 10"
#define LINE_DOTTED_SEP "4 20"
#define LINE_DASHED "12 12"
#define LINE_DASH_DOT "20 10 5 10"
#define LINE_DASH_DOT "12 8 3 8" // Reduced. Previous was too long
protected:
class ScatterBasicSeries {

View file

@ -26,3 +26,4 @@ file
src.tpp,
Copying;
spellcheck_comments "EN-GB"