ShowFreeHandWaveDlg example for Delphi
procedure TForm1.ShowFreeHandWaveDlg1Click(Sender: TObject);
var
i: L_INT;
nRet: L_INT;
Amplitudes: Array of L_INT;
begin
LEADDlgImgEffect1.Scale:= 10;
LEADDlgImgEffect1.WaveLength:= 5;
LEADDlgImgEffect1.FreeHandWaveFlags:= FILL_CLR Or DIS_FRQ;
LEADDlgImgEffect1.Angle:= 4500;
LEADDlgImgEffect1.FillColor:= RGB ( 200, 0, 0 );
LEADDlgImgEffect1.DlgFlags:= DLG_FREEHANDWAVE_SHOW_PREVIEW Or
DLG_FREEHANDWAVE_SHOW_TOOL_ZOOMLEVEL;
LEADDlgImgEffect1.LEADImage:= LEADImage1;
nRet:= LEADDlgImgEffect1.ShowFreeHandWaveDlg ( 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.FreeHandWave ( @Amplitudes,
LEADDlgImgEffect1.AmplitudesCount,
LEADDlgImgEffect1.Scale,
LEADDlgImgEffect1.WaveLength,
LEADDlgImgEffect1.Angle,
LEADDlgImgEffect1.FillColor,
LEADDlgImgEffect1.FreeHandWaveFlags );
end;
end;