ShowHalftoneDlg example for Delphi
procedure TForm1.ShowHalftoneDlg1Click(Sender: TObject);
var
i: L_INT;
nRet: L_INT;
FileNames: Array [ 0..2 ] of String;
begin
LEADDlgColor1.ItemsCount:= 3;
FileNames[0]:= 'e:\image1.jpg';
FileNames[1]:= 'e:\image2.jpg';
FileNames[2]:= 'e:\image3.jpg';
for i:= 0 to 2 do
begin
LEADImage2.LoadStamp ( FileNames[i] );
LEADDlgColor1.ItemDescription [i]:= IntToStr(i);
LEADDlgColor1.ItemFileName [i]:= FileNames[i];
LEADDlgColor1.ItemBitmap [i]:= LEADImage2.Bitmap;
end;
LEADDlgColor1.Angle:= 5;
LEADDlgColor1.Dimension:= 5;
LEADDlgColor1.HalftoneType:= HT_RECT;
LEADDlgColor1.DlgFlags:= DLG_HALFTONE_SHOW_PREVIEW Or
DLG_HALFTONE_SHOW_TOOL_ZOOMLEVEL Or
DLG_HALFTONE_SHOW_TOOL_SHOWEFFECT Or
DLG_HALFTONE_SHOW_TOOL_ONSCREEN Or
DLG_HALFTONE_SHOW_TOOL_RESET;
LEADDlgColor1.LEADImage:= LEADImage1;
nRet:= LEADDlgColor1.ShowHalftoneDlg ( Self );
if ( nRet = SUCCESS_DLG_OK ) then
begin
ShowMessage ( 'No of Selected Items are ' + IntToStr(LEADDlgColor1.SelectedBitmapsCount) );
if ( LEADDlgColor1.SelectedBitmapList <> 0 ) then
LEADImage1.BitmapList:= LEADDlgColor1.SelectedBitmapList;
end;
end;