Void CoilDlg: : addcurve (Graphics & amp; G, Pen, Pen * int j)//draw curve, j=0 to article 1,
{
PointF point [300].
for(int i=1; i<=data_num; I++)
{
Point] [I - 1=PointF (left_line + Tite_W * z/6, H - I * H/10);
//point [0]=PointF (left_line + Tite_W * z/6, H/H - 0.1 * 10);
//point [1]=PointF (left_line + Tite_W * z/6, H - H/10);
G.D rawCurve (pen, point, data_num, 1.0 f);
}
}
Which PointF (left_line + Tite_W * z/6, H - I * H/10) in addition to I are desktop pixels to a fixed value, should draw a vertical line in theory, but I draw the line is very strange, if I alone to this assignment, some two points and then draw two line segments is no problem, but had problems with circulation assignment
Point [0]=PointF (left_line + Tite_W * z/6, H/H - 0.1 * 10);
Point [1]=PointF (left_line + Tite_W * z/6, H - H/10);
G.D rawCurve (pen point, 2,1.0 f); This is no problem,
CodePudding user response:
I++ should be I +=2