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
 Rect and SetObjBitmapFromFile
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

egrobler

42 Posts

Posted - Dec 08 2013 :  17:16:01  Show Profile  Reply
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

xequte

38616 Posts

Posted - Dec 09 2013 :  14:10:31  Show Profile  Reply
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
Go to Top of Page

egrobler

42 Posts

Posted - Dec 09 2013 :  15:40:46  Show Profile  Reply
Thanks :-)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: