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

c.basso

Italy
36 Posts

Posted - Apr 02 2015 :  10:00:50  Show Profile  Reply
I have an image,
I've set the scale using SetScaleFromPixels.
MUnit is set to Millimeters.

So I know that 63pixel are equal to 10mm in my image.
The ScaleFactor is approx 1,87...

Now I need to create programmatically an object that is 10mm length.

I dont' understand how to use ScaleFactor value,
If I do:
10 / ScaleFactor = 5,34... ???

Thanks
Claudio

Claudio

c.basso

Italy
36 Posts

Posted - Apr 02 2015 :  13:35:45  Show Profile  Reply
Solved!

If you are using MUnit as Millimeters:
To get pixel value:
(ImageEn.DpiX / ScaleFactor * MM_VALUE) / 25,4

(/ 25,4 is to get Inch from mm)


Claudio
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: