CurveToBezier example for C++ Builder

   int i;
   POINT *p = (POINT*) malloc ( LEADImage1->BezierSize * sizeof ( POINT ));

   LEADImage1->CurveClose= CURVE_CLOSE;
   LEADImage1->CurveSize = 4;
   LEADImage1->CurveX[0] = 220;
   LEADImage1->CurveY[0] = 10;
   LEADImage1->CurveX[1] = 10;
   LEADImage1->CurveY[1] = 30;
   LEADImage1->CurveX[2] = 20;
   LEADImage1->CurveY[2] = 240;
   LEADImage1->CurveX[3] = 250;
   LEADImage1->CurveY[3] = 260;
   LEADImage1->CurveTension= 0.35;
   LEADImage1->CurveType= CURVE_STANDARD;
   LEADImage1->SetRgnCurve(L_POLY_WINDING, L_RGN_SET);
   LEADImage1->RgnFrameType= ftAnimated;

   LEADImage1->CurveToBezier();
   for (i=0; i<LEADImage1->BezierSize; i ++)
   {
      p[i].x= LEADImage1->BezierX[i];
      p[i].y= LEADImage1->BezierY[i];
   }
   PolyBezier((HDC)Form1->Canvas->Handle, (POINT*)p, LEADImage1->BezierSize) ;
   free ( p ) ;