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
 Magnetic Snap for Layers in TImageEnView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Harald M.

Austria
3 Posts

Posted - Feb 07 2023 :  08:00:32  Show Profile  Reply
Hello,

I want to load several Layers in an ImageEnView - and arrange and position the layers via Mouse - with Hitdetection between Layers and most importend with magnetic snap to each of the layers. (Moving one layer and within snapdistance the Layer "snaps" to the postioned Layer nearby).

Even though I did a quick grep through the source with "snap" and "magnetic" - the searchresults doesnt seem to do what I need.
Am I correct that something like that doesn't exist in the ImageEn Libary?

TiA,
Harald

Harald

Harald M.

Austria
3 Posts

Posted - Feb 07 2023 :  08:06:43  Show Profile  Reply
Found IEView.Layers[i].LayerRect.IntersectsWith() -> for Hitdetection

and to clarify: I dont want to align / snap the layers on a Grid, I want to snap / align the layers on each other; some layer may be positioned and snap on that positioned layer...

TiA,
Harald

Harald
Go to Top of Page

xequte

38175 Posts

Posted - Feb 08 2023 :  13:42:41  Show Profile  Reply
Hi Harald

I'm sorry, we only have grid snapping at this time. You might want to code something in the OnLayerMoveSize event to do it.

http://www.imageen.com/help/TImageEnView.OnLayerMoveSize.html

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

Harald M.

Austria
3 Posts

Posted - Feb 14 2023 :  00:31:51  Show Profile  Reply
Ok - was hoping there was already something I could (re)use. But anyway - was a bit more work than thought but I was able to add the necessary events in OnLayerMoveSize and LayerNotifyEx to create something matching my expectatations.

Harald
Go to Top of Page

xequte

38175 Posts

Posted - Feb 14 2023 :  20:52:41  Show Profile  Reply
Nice one, Harald. You might want to post your solution here. If it works well, we might add it as an option.

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