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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 SelPasteFromClip and SelPasteFromClipStretch

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
wvisser Posted - Sep 25 2011 : 04:23:25
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
1   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Sep 26 2011 : 00:03:08
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.