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
 Fit to TimageEnVect size

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
ymae Posted - Jun 27 2022 : 02:26:14
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

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 27 2022 : 17:40:50
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