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
 Fit to TimageEnVect size
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

ymae

Korea
10 Posts

Posted - Jun 27 2022 :  02:26:14  Show Profile  Reply
hi
Stretch is not working in TimageEnVect.
If you look at the attached image, there is an empty space like a red box on both sides.
How can I ignore the aspect ratio and stretch it to fit the TimageEnVect size?
please reply thank you

xequte

38608 Posts

Posted - Jun 27 2022 :  17:40:50  Show Profile  Reply
If you are happy to for the image to be distorted (aspect ratio is ignored) then you can use:

// Stretch image to control size without maintaining the aspect ratio
ImageEnView.GetIdealZoom( ZoomX, ZoomY );
ImageEnView.ZoomX := ZoomX;
ImageEnView.ZoomY := ZoomY;


If you want to maintain the aspect ratio and are happy for edges of the image to be cut off (visually), you can use TImageEnView.FitCropping. See the examples at:

https://www.imageen.com/help/TImageEnView.FitCropping.html



Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: