正弦函数GDIPlus - 龙巢NET刀

时间:2024-03-11 21:55:48

正弦函数GDIPlus

float rota = 0.0f;
float zrota = 1.0f;

int   c1 = 100;
int   c2 = 200;
int   tmp = 0;
int   step = -200;

int Render()
{
 
 if(step > 800){
  step = -200;
  InvalidateRect(hWnd,&rect,true);
 }

    Graphics graphics(hdc); 
 GraphicsPath path;
 
 Pen pen(Color(255,0,255,0),1);

 SolidBrush sBrs(Color(255,0,0,0));
 Brush *brs = sBrs.Clone();
   
 tmp = c1;
 c1 = c2; c2 = tmp;

 Point p[] = {Point(100,c1),Point(150,c1),
     Point(150,c2),Point(200,c2)};
 
    graphics.TranslateTransform(step, 50);
 graphics.DrawBeziers(&pen,p,4);
 
  
 //InvalidateRect(hWnd,&rect,true);
 step+=100;
 Sleep(1000);
   
 return 0;
}