|
HDC hdc;
hdc=GetDC(Form1->Image1->Canvas->Handle );
Form1->DoubleBuffered =true;
int y[880] ;
float x=0;
int z=rand();
for (int i=0;i<880;i++)
{
y[i]=sin(x+z)*100;
x=x+3.1415/40;
}
TPoint pot[800];
int xx=0;
int i=0;
if (y[i]<0)
{
y[i]=-2*y[i] ;
}
for (int j=0; j<800;j++)
{
pot[j]=Point(xx,y[i]+100);
xx=xx+1;
i++;
}
unsigned long num[1];
num[0]=799;
Image1->Picture =NULL;
Image1->Canvas->Pen->Color=clBlue;
PolyPolyline(hdc,pot,num,1); // 无法画线
Image1->Canvas->Polyline(pot,799) ; // 而它可以
大家帮帮忙 郁闷死了 ! |
|