Use... TImageEnProc.SelPasteFromClipStretch
Declaration
procedure SelPasteFromClipStretch(MergeAlpha: Boolean=true);
Description
This method pastes the clipboard image to the selected region, stretching the image to fit the selection.
All uncompressed DBI formats are handled (1, 4, 8, 15, 16, 24 and 32 bits).
If clipboard image is 4, 8, 15, 16, 24 or 32 bits, it is converted to 24 bit, otherwise (1 bit) it remains 1 bit.
If MergeAlpha is valid only trasfering image in internal format.
It merges the pasting bitmap alphachannel with the background bitmap.
procedure TForm1.Paste1Click(Sender: TObject);
{ Paste1Click. }
begin
if ImageEnView1.Proc.IsClipboardAvailable then
begin
ImageEnView1.Proc.SaveUndoCaptioned
('Paste ' + IntToStr(ImageEnView1.Proc.UndoCount));
ImageEnView1.Proc.ClearAllRedo;
if ImageEnView1.Selected then
begin
ImageEnView1.Proc.SelPasteFromClip(True);
ImageEnView1.Update;
end
else
ImageEnView1.Proc.PasteFromClipboard;
ImageEnView1.Update;
end
else
begin
ShowMessage('There are no image in the clipboard.');
end;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development