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
 Measurement units
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ronald Ruijs

Netherlands
24 Posts

Posted - Apr 16 2020 :  16:40:38  Show Profile  Reply
Hello,

How do measurement actions work?

I added TImageEnViewMouseMeasureLength action to my ActionManager, and set TImageEnView.RulerPararams.Units to ieuMillimaters.

However, measurements are still in pixels. Am I missing something?

Regards, Ronald

xequte

38180 Posts

Posted - Apr 16 2020 :  18:07:16  Show Profile  Reply
Hi Ronald

What is displaying measurements? A layer, a measurement tool, the ruler?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ronald Ruijs

Netherlands
24 Posts

Posted - Apr 17 2020 :  05:02:40  Show Profile  Reply
Hi Nigel,

I think the Action sets TImageEnView.MouseInteractGeneral to miMeasureLength. I guess a LineLayer is created? Both guesses are based on source code studying, as I could not find this in the helpfile.

Help topic TIEMouseInteract says SetScale has to be called, which I did, but I could not find how to speify unit, I expected TImageEnView.RulerParams to be valid for all measurements..

The MeasureIt sets units at global level, which I am a bit reluctant to do, as I have several images with different units.

Regards, Ronald
Go to Top of Page

xequte

38180 Posts

Posted - Apr 18 2020 :  03:05:17  Show Profile  Reply
Sorry Ronald, I missed that you mentioned TImageEnViewMouseMeasureLength. Are you using 9.0.0? I think that was an issue resolved in that release.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ronald Ruijs

Netherlands
24 Posts

Posted - Apr 18 2020 :  05:54:30  Show Profile  Reply
Hi Nigel,

Yes, I am using v 9.0.0.

Regards, Ronald
Go to Top of Page

xequte

38180 Posts

Posted - Apr 18 2020 :  06:24:02  Show Profile  Reply
Sorry Ronald, I've been run off my feet the last week due to the new release, which is my excuse for still not reading your message correctly.

TImageEnView.RulerParams.Units only affects the ruler.

Measurement units are specified by:

https://www.imageen.com/help/TIEImageEnGlobalSettings.DefaultMeasureUnit.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ronald Ruijs

Netherlands
24 Posts

Posted - Apr 18 2020 :  10:40:04  Show Profile  Reply
Hi Nigel,

Thank for explaining. So, there is no possibility to have 2 TImageEnViews visible, 1 measuring in millimeters and 1 measuring in pixels?

In the helpfile, I noticed that I can also specify measureunits by setting LayerDefaults. However, I did not get that to work.

What I do:
I set LeayerDefaults.Add(IELP_RulerUnits + '=' + Ord(ieuMillimeters).ToString); but measuring via action is still in pixels, not in millimeters. AM I missing something?

Regards, Ronald
Go to Top of Page

xequte

38180 Posts

Posted - Apr 19 2020 :  01:26:09  Show Profile  Reply
Hi Ronald

For individual TImageEnView control, use the OnMeasure event:

https://www.imageen.com/help/TImageEnView.OnMeasure.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ronald Ruijs

Netherlands
24 Posts

Posted - Apr 20 2020 :  09:55:12  Show Profile  Reply
OK, clear. Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: