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
 BaseLayer(Image), PerimeterLayer(Polygon), BoxLayers(Multiple Polygons)
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
159 Posts

Posted - Feb 22 2025 :  13:15:52  Show Profile  Reply
How do I reference a Selected BoxLayer X/Y Offset against the underling Perimeter Layer ?
eg.
|-------------------------------------------------------------------------------|
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                  |----|       |
|                                                                  |    |       |
|                                                                  |----|       |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|-------------------------------------------------------------------------------|

All of my testing for X/Y points only relates to Box Layer, I need to reference Box Layer Offset Points against the underlying Perimeter Layer (without merging layers) ?

Please advise - Thanks in advance

Andy

xequte

38940 Posts

Posted - Feb 23 2025 :  02:12:08  Show Profile  Reply
Hi Andy

Why not just subtract the PosX,PosY for the perimeter from the box layer PosX,PosY?

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

andyhill

Australia
159 Posts

Posted - Feb 23 2025 :  17:15:44  Show Profile  Reply
Tried that but all sorts of irregularities. I am now doing this after each Layer Creation

ImageEnView.LayersSetProperties(LYR_ALL_LAYERS, IELP_RulerUnits, IntToStr(ord(IEGlobalSettings().DefaultMeasureUnit)));

will advise

Andy
Go to Top of Page

xequte

38940 Posts

Posted - Feb 23 2025 :  19:39:45  Show Profile  Reply
Hi Andy

Sorry, I'm not sure what you mean by that. Perhaps I'm not quite understanding your requirements.

The position of a point on a layer (in terms of the underlying bitmap) can be obtained using:

https://www.imageen.com/help/TImageEnView.XScr2Bmp.html
https://www.imageen.com/help/TImageEnView.YScr2Bmp.html

Or for the layer:

https://www.imageen.com/help/TIELayer.ConvXScr2Bmp.html
https://www.imageen.com/help/TIELayer.ConvYScr2Bmp.html

And the origin of each layer (its PosX, PosY) is specified in terms of the underlying bitmap.

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

andyhill

Australia
159 Posts

Posted - Feb 24 2025 :  13:47:56  Show Profile  Reply
Thanks Nigel.

Also I have set the Scale

ImageEnView.SetScale(941, 91.44, ieuCentimeters);

So all measurements are now returned with the Scale taken into consideration - YES ?



Andy
Go to Top of Page

xequte

38940 Posts

Posted - Feb 24 2025 :  18:00:22  Show Profile  Reply
Sorry Andy, which measurements are you referring to?


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

andyhill

Australia
159 Posts

Posted - Feb 25 2025 :  12:49:10  Show Profile  Reply
My question was once I set the Scale, then irrespective of Zoom, Layer or DPI, all of the XScr2Bmp functions etc. will return results based on Scale - Is this correct ?

Andy
Go to Top of Page

xequte

38940 Posts

Posted - Feb 25 2025 :  13:46:20  Show Profile  Reply
No, that's not correct. XScr2Bmp only converts a pixel position on the screen (affected by zoom and scrolling) into a pixel on the bitmap.



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