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
 How to capture the ielResized event
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

99 Posts

Posted - Mar 05 2024 :  04:07:25  Show Profile  Reply
In the following function, I want to capture the ielResized event after the user changed the size of the line layer with the mouse.
void __fastcall TImageForm::ImgEnMainLayerNotifyEx(TObject *Sender, int layer, TIELayerEvent event){
if (event == ielResized) {
// update info

}
}
But I can't receive the ielResized event, after ielMovedPoint I only got ielEditedPoints.So how to capture the ielResized event?

xequte

38615 Posts

Posted - Mar 05 2024 :  15:10:23  Show Profile  Reply
Hi

ielResized only occurs for MouseInteractLayers of mlResizeLayers.
For mlEditLayerPoints, completion of the action triggers ielEditedPoints.

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

supersk

99 Posts

Posted - Mar 05 2024 :  19:23:18  Show Profile  Reply
Thank you for your quick reply.Another question, how do I stop the mouse from moving point after receiving the event ielMovedPoint?
Go to Top of Page

xequte

38615 Posts

Posted - Mar 06 2024 :  19:34:38  Show Profile  Reply
Hi

Moved point is an ongoing change. ielEditedPoints is when the editing is completed.

If you want to force completion of the current editing, you would need to enact it.

var
  idx: Integer;
  lyrCreateTool: TIELayerCreateInteraction;
begin
  idx := ImageEnView1.UserInteractions.FindInstanceOf(TIELayerCreateInteraction);
  lyrCreateTool := ImageEnView1.UserInteractions[ idx ] as TIELayerCreateInteraction;
  lyrCreateTool.Enact();
end;



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