procedure TForm1.MakeTransparent1Click(Sender: TObject);
{ Make the area inside of the selection transparent. }
begin
if ImageEnView1.Selected then
begin
Screen.Cursor := crHourGlass;
try
ImageEnView1.Proc.SaveUndoCaptioned('Make Selection Transparent ' +
IntToStr(ImageEnView1.Proc.UndoCount));
Undo1.Hint := 'Make Selection Transparent ' + IntToStr(ImageEnView1.Proc.UndoCount);
ImageEnView1.EnableAlphaChannel := True;
ImageEnView1.IO.Params.BitsPerSample := 8;
ImageEnView1.IO.Params.SamplesPerPixel := 4;
ImageEnVIew1.SetSelectedAreaAlpha(0);
Undo1.Enabled := ImageEnView1.Proc.CanUndo;
ImageEnView1.Bitmap.Modified := True;
finally
Screen.Cursor := crDefault;
end;
end
else
begin
MessageDlg('There is no selection. Please make a selection and try again.', mtWarning, [mbOK],
0);
end;
end
;
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html