mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-10 03:54:54 -06:00
ScatterDraw: Fixed to compile
git-svn-id: svn://ultimatepp.org/upp/trunk@12916 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
54ee49d273
commit
bb8952483f
4 changed files with 10 additions and 8 deletions
|
|
@ -760,6 +760,7 @@ void ScatterCtrl::MouseMove(Point pt, dword keyFlags)
|
|||
case LEFT_DOWN: mouseAction = LEFT_MOVE; break;
|
||||
case MIDDLE_DOWN: mouseAction = MIDDLE_MOVE; break;
|
||||
case RIGHT_DOWN: mouseAction = RIGHT_MOVE; break;
|
||||
default: ; // avoids warning
|
||||
}
|
||||
WhenMouseClick(pt, keyFlags, mouseAction);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ class TableData : public DataSourceSurf, public TableInterpolate {
|
|||
public:
|
||||
typedef double (TableData::*Getdatafun)(int d);
|
||||
|
||||
TableData() : areas(false), lendata(0), lenxAxis(0), lenyAxis(0) {};
|
||||
TableData() : lendata(0), lenxAxis(0), lenyAxis(0), areas(false) {};
|
||||
|
||||
Interpolate Inter() {return inter;}
|
||||
void Inter(Interpolate inter) {this->inter = inter;}
|
||||
|
|
|
|||
|
|
@ -10,19 +10,19 @@ static void DrawPie(Draw& w, double c_x, double c_y, double r, int start, int al
|
|||
Point centre = Point(int(c_x), int(c_y));
|
||||
vP << centre;
|
||||
int ix;
|
||||
int iy;
|
||||
int iy;
|
||||
for (int i = 0; i <= n; i++) {
|
||||
double x = c_x + r*cos((start+i*dalpha)*M_PI/1800);
|
||||
ix = fround(x);
|
||||
ix = fround(x);
|
||||
double y = c_y + r*sin((start+i*dalpha)*M_PI/1800);
|
||||
iy = fround(y);
|
||||
double dxy = (x-ix)*(x-ix) + (y-iy)*(y-iy);
|
||||
if(dxy < 0.1 || i == 0 || i == n)
|
||||
if(dxy < 0.1 || i == 0 || i == n)
|
||||
vP << Point(ix,iy);
|
||||
if(w.IsGui())
|
||||
w.DrawRect(ix, iy, 1, 1, Blend(fill, background, 150));
|
||||
if(w.Pixels())
|
||||
w.DrawRect(ix, iy, 1, 1, Blend(fill, background, 150));
|
||||
}
|
||||
vP << centre;
|
||||
vP << centre;
|
||||
w.DrawPolygon(vP, fill, width, outline, pattern, Null);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1662,7 +1662,8 @@ void ScatterDraw::Plot(T& w)
|
|||
case ALIGN_LEFT: ddx = 0; break;
|
||||
case ALIGN_CENTER: ddx = -sz.cx/2; break;
|
||||
case ALIGN_RIGHT: ddx = -sz.cx; break;
|
||||
}
|
||||
default: ; // to avoid warning
|
||||
}
|
||||
double x = points[i].x + dx + ddx;
|
||||
double y = points[i].y + dy + ddy;
|
||||
DrawText(w, x, y, 0, txt, fnt, series[j].labelsColor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue