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
 Move line-endpoints in every direction?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

860 Posts

Posted - Sep 13 2020 :  05:05:34  Show Profile  Reply
I create Line Layers with this code:

ImageEnView1.MouseInteractGeneral := [];
ImageEnView1.MouseInteractLayers := [mlClickCreateLineLayers, mlMoveLayers, mlResizeLayers];
ImageEnView1.Layers[0].Selectable := False;


This works well, and WHILE drawing the line with the mouse, I can draw the line in any direction.

BUT: After having finished drawing the line, when moving one of the line-endpoints with the mouse, allows me to drag only in a range of 90 degrees!

Why this restriction? Is it somehow possible to overcome this restriction and move the line-endpoint in every direction in the full range of 360 degrees like when initially drawing the line?

xequte

38182 Posts

Posted - Sep 13 2020 :  20:30:05  Show Profile  Reply
That's odd. Have you specified a shift key lock?

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

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

PeterPanino

860 Posts

Posted - Sep 14 2020 :  09:00:57  Show Profile  Reply
I do not use "shift key lock". For security, I have added it to my line-layer creation code:

ImageEnView1.MouseInteractGeneral := [];
ImageEnView1.MouseInteractLayers := [mlClickCreateLineLayers, mlMoveLayers, mlResizeLayers];
ImageEnView1.ShiftKeyLock := [];
ImageEnView1.Layers[0].Selectable := False;


Here is a small video of what happens after having created the line-layer with the mouse (activate animated gifs in your browser):



As you can see, the line can only be moved inside an angle of 90 degrees.
Go to Top of Page

xequte

38182 Posts

Posted - Sep 15 2020 :  03:19:06  Show Profile  Reply
Hi Peter

Your only specified options are to create, size or move the layer, not to rotate or edit points.

Please see mlEditLayerPoints or mlEditLayerPoints:

https://www.imageen.com/help/TIEMouseInteractLayers.html

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

PeterPanino

860 Posts

Posted - Sep 15 2020 :  11:26:42  Show Profile  Reply
Hi Nigel,

with this code:
ImageEnView1.MouseInteractLayers := [mlClickCreateLineLayers, mlMoveLayers, mlResizeLayers, mlEditLayerPoints];
it works perfectly as desired.

BTW, just a very small suggestion: When moving the whole layer we have the standard MOVE mouse cursor, which is fine:



But when moving just one of the LINE-END-POINTS (which is a completely different action), currently the SAME standard MOVE mouse cursor is used (which is inconsistent):



I suggest using a slightly different Move cursor for moving line-endpoints (like in the above case). For example, the same MOVE cursor, but in red color:



(After research I found out that Windows 10 has an API to change the mouse cursor color. Or you could just use your own custom cursor).
Go to Top of Page

xequte

38182 Posts

Posted - Sep 15 2020 :  17:15:52  Show Profile  Reply
Hi Peter

ImageEn does have its own set of custom cursors:

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

However there is not one similar, but different from the standard NWSE cursor. We'll look at adding one in a later update.

Also, although the UI does not prevent it, it might be better not to use mlMoveLayers and mlEditLayerPoints together.

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

PeterPanino

860 Posts

Posted - Sep 20 2020 :  07:44:00  Show Profile  Reply
 
it might be better not to use mlMoveLayers and mlEditLayerPoints together.


Why? I have not encountered any problems when creating Line Layers with mlMoveLayers and mlEditLayerPoints together.
Go to Top of Page

xequte

38182 Posts

Posted - Sep 20 2020 :  16:28:06  Show Profile  Reply
Hi Peter

I'm not aware of any issues, just that when we designed that we didn't envision them generally being used together, so there might be something we overlooked.

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