ShowFreeHandShearDlg example for Delphi

procedure TForm1.ShowFreeHandShearDlg1Click(Sender: TObject); 
var
   i: L_INT; 
   nRet: L_INT; 
   Amplitudes: Array of L_INT;   
begin
   LEADDlgImgEffect1.DlgFlags:= DLG_FREEHANDSHEAR_SHOW_PREVIEW Or
                                DLG_FREEHANDSHEAR_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgEffect1.LEADImage:= LEADImage1; 

   nRet:= LEADDlgImgEffect1.ShowFreeHandShearDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK ) then
   begin
      SetLength ( Amplitudes, LEADDlgImgEffect1.AmplitudesCount ); 

      for i:= 0 to LEADDlgImgEffect1.AmplitudesCount-1 do
      begin
         Amplitudes[i]:= LEADDlgImgEffect1.Amplitudes [i]; 
      end; 

      LEADImage1.FreeHandShear ( @Amplitudes, 
                                 LEADDlgImgEffect1.AmplitudesCount, 
                                 LEADDlgImgEffect1.Scale
                                 LEADDlgImgEffect1.FillColor
                                 LEADDlgImgEffect1.FreeHandShearFlags ); 
   end; 
end;