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
 Rect and SetObjBitmapFromFile

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
egrobler Posted - Dec 08 2013 : 17:16:01
Hi,

If you load an image using SetObjBitmapFromFile it stretches it to fit the specified TRect.
Is it possible to get the image to AutoFit without stretching?

ImageEnVect1.SetObjBitmapFromFile(-1, 'MyDifferentSizeImage.jpg');
ImageEnVect1.ObjKind[-1] := iekBitmap;
ImageEnVect1.SetObjRect(-1, Rect(0, 0, 800, 600));
ImageEnVect1.AddNewObject();

Thanks & Regards
Eric
2   L A T E S T    R E P L I E S    (Newest First)
egrobler Posted - Dec 09 2013 : 15:40:46
Thanks :-)
xequte Posted - Dec 09 2013 : 14:10:31
Hi Eric

In the next release we have added a new parameter to handle this:

procedure TImageEnVect.SetObjRect(hobj: integer; const Rect: TRect; bMaintainAspectRatio : Boolean = False);

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com