ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 SelPasteFromClip and SelPasteFromClipStretch
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wvisser

Netherlands
8 Posts

Posted - Sep 25 2011 :  04:23:25  Show Profile  Reply
Hello,

I am using SelPasteFromClip to paste clipboard content into a selected area inside an image. (ImageEn v3.12)
This works well, only the aspect ratio of the bitmap in the clipboard changes as it is stretched to the boundaries of the selected area.
I was actually expecting this to happen only with the "SelPasteFromClipStretch" method. Looking at the online help, I would expect SelPasteFromClip to reduce size until the pasted bitmap fits into the selection region with aspect ratio maintained.

SelPasteFromClip and SelPasteFromClipStretch seem to do exactly the same. Also in the code I do not see differences that could do this.

Am I missing something here?
WHat is the difference between SelPasteFromClip and SelPasteFromClipStretch ?

regards and thanks Wilfried









wpjvisser

fab

1310 Posts

Posted - Sep 26 2011 :  00:03:08  Show Profile  Reply
Hello,
you could use PointPasteFromClip to paste the image to a specific position, maintaining the original sizes.
Another way is create a layer and paste the image inside it, allowing the user to move and resize it:


imageenview1.LayersAdd();
imageenview1.Proc.PasteFromClipboard();
imageenview1.MouseInteract := ImageEnVect1.MouseInteract +[miMoveLayers,miResizeLayers];


Boths SelPasteFromClip and SelPasteFromClipStretch stretches the image to the selected area, as specified in the documentation.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: