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
 Best Approach For Duplicate Remote Display
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PaulAtMass

United Kingdom
19 Posts

Posted - Jul 05 2018 :  06:51:22  Show Profile  Reply
Hi,
I've a general approach question. My application has a duplicate display, the active display on which the user will be annotating layers to a background image using TImageEnView and a remote duplicate display with another TImageEnView component.
I was looking at using the SetExternalBitmap method. However the displays will be used for annotations polylines, text, lines so as the user draws on one View I'd like it to appear on the remote display, so they are pretty much in sync with eachother. Approach options so far:

1. Using SetExternalBitmap and having to merge layers on each mouse polyline add point event seems very heavy.
2. Do I have to capture the mouse down, drag events and transpose them across to the remote display or
3. Can I do something clever like sharing the same underlying current TIELayer?

Any advice would be most appreciated.

xequte

39053 Posts

Posted - Jul 05 2018 :  15:55:08  Show Profile  Reply
Hi

I would definitely do it on a per layer basis. Use the OnLayerNotifyEx event to track layer changes:

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

When a new layer is added, clone it:

ImageEnView2.LayersInsert( lyr, ImageEnView1.Layers[ lyr ]);

When layers change (properties, etc), simply assign the changes:

ImageEnView2.Layers[ lyr ].Assign( ImageEnView1.Layers[ lyr ] );

For speed, I would have a special case for position and size changes, just assigning the LayerRect (instead of a complete assign).

Also, avoid too frequent calls to ImageEnView.Update(); (e.g. once per second at most).


Can I suggest you do a proof of concept with the Demo\LayerEditing\Layers_AllTypes\Layers.dpr demo (local clone). I would be glad to debug any issues you encounter, as I would like to add the demo to our install (I can't code it myself right now as I am busy with 8.0.1).


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

PaulAtMass

United Kingdom
19 Posts

Posted - Jul 06 2018 :  05:20:47  Show Profile  Reply
Hi Nigel,
thanks for your response. I'll let you know how I get on.
Unfortunately whilst playing with the Layers.dpr demo I get an exception 'Layer insertion error - Invalid Type: 106'. I've added a couple of shapes and lines then saved it to an IEN file. Exit the App and relaunch it then the exception occurs during loading the IEN file. I've only just upgraded to 8.0.0 do you think its an install problem?

regards
Paul
Go to Top of Page

xequte

39053 Posts

Posted - Jul 06 2018 :  06:38:54  Show Profile  Reply
Hi Paul

Can you email me the IEN file for analysis.

We're expecting to get 8.0.1 out shortly to resolve some issues in 8.0.0.

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