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
 Exact Width and Height of Thumbnail
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

xequte

38610 Posts

Posted - May 02 2017 :  15:14:46  Show Profile  Reply
I have a question:
I need to supply custom bitmaps for the TImageEnMView control.
Is there a way to find out exact Width and Height of the bitmap within the dimensions of the thumbnail, taking into the account border and style settings, to avoid stretching/distortion of the bitmap.
I am using OnImageIDRequest event and it would be convenient to have pre-calculated Width and Height as incoming parameters to the event, so that bitmap can be created with exact measurements and displayed as is by the control.


Thanks,

Eugene

xequte

38610 Posts

Posted - May 02 2017 :  17:42:51  Show Profile  Reply
Hi

Please use:

https://www.imageen.com/help/TImageEnMView.ThumbSizeInfo.html

ThumbSize := ThumbSizeInfo( itsImage );


Explanation of ThumbSizeInfo Data param:

Here is a filled TImageEnMView:

_[o]_[o]_[o]_[o]_
_[o]_[o]_[o]_[o]_
_[o]_[o]_[o]_[o]_
_[o]_[o]_[o]_[o]_

itsImage: Just the thumbnail "o"
itsCell: Just the thumb cell "[o]"
itsOuter: Cell and the spacing around it "_[o]_"

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