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
 Measuring Issues
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
153 Posts

Posted - Mar 03 2025 :  23:31:56  Show Profile  Reply
I have a preloaded base image with Scale set - all good.

User loads a new base image and the user measures a section and provides the Relative New Size and we recalc the scale.

I want to change default (at runtime)

IEGlobalSettings().DefaultMeasureUnit:= ieuMeters;
IEGlobalSettings().MeasureUnits[ieuMeters]:= '';

to

IEGlobalSettings().DefaultMeasureUnit:= ieuPixels;
IEGlobalSettings().MeasureUnits[ieuPixels]:= '';

measure, then set new scale, then revert back to

IEGlobalSettings().DefaultMeasureUnit:= ieuMeters;
IEGlobalSettings().MeasureUnits[ieuMeters]:= '';

NO Mtrs to Pixels takes place ? (stuck in Mtrs from startup).


Andy

xequte

38875 Posts

Posted - Mar 04 2025 :  14:13:18  Show Profile  Reply
Hi Andy

Setting DefaultMeasureUnit changes the measurement value that is shown to the user.

Can you explain what you mean by: "we recalc the scale"?

Do you mean the user measures again?

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

andyhill

Australia
153 Posts

Posted - Mar 04 2025 :  18:21:18  Show Profile  Reply
Firstly, the Base Image is Loaded, IEGlobalSettings().DefaultMeasureUnit:= ieuMeters; and ImageEnView.SetScale are initialized in FormCreate.

Now at runtime a change from Meters to Pixels is required IEGlobalSettings().DefaultMeasureUnit:= ieuPixels; does not change - still stuck in Meters ???

User loads new base image replacing old base image with scale now incorrect so a new measure/scale is required.

At present we are stuck in Meters. Also drawing unit issues.

I want to be able at runtime to change drawing units. I see you allow for PosXD but not allow for PolyLine AddPoint(XD, YD ???

After image loaded and scale set I would like to draw in Meter Units eg. XD:= 1.030mtrs etc.


Andy
Go to Top of Page

xequte

38875 Posts

Posted - Mar 05 2025 :  21:56:05  Show Profile  Reply
Hi Andy

In the demo you sent me, you can click a button on the toolbar to enable measuring:

ImageEnView.MouseInteract := [miMeasureLength];


I added buttons for:

IEGlobalSettings().DefaultMeasureUnit:= ieuMeters;
IEGlobalSettings().MeasureUnits[ieuMeters]:= 'M';

And:

IEGlobalSettings().DefaultMeasureUnit:= ieuPixels;
IEGlobalSettings().MeasureUnits[ieuPixels]:= 'px';

If I click these buttons, and then the measure button, the measurement CORRECTLY changes to metres/pixels.

If that is not what you mean, please explain step by step.


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

andyhill

Australia
153 Posts

Posted - Mar 05 2025 :  23:32:33  Show Profile  Reply
Above does not change on my version, I have requested latest version.

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