ShowFreeHandShearDlg example for C++ Builder

void __fastcall TForm1::ShowFreeHandShearDlg1Click(TObject *Sender) 
{
   L_INT i; 
   L_INT nRet; 
   L_PINT pAmplitudes= NULL; 

   LEADDlgImgEffect1->DlgFlags = DLG_FREEHANDSHEAR_SHOW_PREVIEW |
                                 DLG_FREEHANDSHEAR_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgEffect1->LEADImage = LEADImage1; 

     nRet= LEADDlgImgEffect1->ShowFreeHandShearDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      pAmplitudes= (L_PINT)malloc ( LEADDlgImgEffect1->AmplitudesCount * sizeof(L_INT) ); 

      for ( i= 0; i < (L_INT)LEADDlgImgEffect1->AmplitudesCount; i ++ ) 
      {
         pAmplitudes[i]= LEADDlgImgEffect1->Amplitudes [i]; 
      }
      LEADImage1->FreeHandShear ( pAmplitudes, 
                                  LEADDlgImgEffect1->AmplitudesCount, 
                                  LEADDlgImgEffect1->Scale
                                  LEADDlgImgEffect1->FillColor
                                  LEADDlgImgEffect1->FreeHandShearFlags ); 
      if ( pAmplitudes ) 
         free ( pAmplitudes ); 
   }
}