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 switch to select mode after draw line layer
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Pawel

Poland
33 Posts

Posted - May 07 2019 :  15:17:14  Show Profile  Reply
I try to draw a measureline,
ImageEnView.MouseInteract := [ miClickCreateLineLayers, miEditLayerPoints, miMeasureLength];


and then, I want to switch to select mode in ImageEnViewLayerNotifyEx procedure:
if ImageEnView.Layers[layer].Kind = ielkLine then
      begin
               if event in [ielCreated] then
               begin
                  ImageEnView.MouseInteract := [  miMoveLayers, miResizeLayers ];
               end
      end
   


but, this way my line disappears. Why?

xequte

38725 Posts

Posted - May 07 2019 :  17:10:14  Show Profile  Reply
Hi

Are you trying to convert a measure line into a line layer?



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

Pawel

Poland
33 Posts

Posted - May 08 2019 :  04:25:26  Show Profile  Reply
measure line isn't a line layer?
I think it is because the debugger catches after the condition
if ImageEnView.Layers[layer].Kind = ielkLine then


but does not matter.
I just want to know how to draw a line and then switch to selection mode
and why my line layer disappears
Go to Top of Page

xequte

38725 Posts

Posted - May 08 2019 :  17:40:30  Show Profile  Reply
Why not just use:

ImageEnView.MouseInteract := [ miClickCreateLineLayers, miEditLayerPoints ];


miMeasureLength is for measuring lengths in an image.


You might also want to try Line Layers demo.


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

Pawel

Poland
33 Posts

Posted - May 10 2019 :  02:59:26  Show Profile  Reply
But I want to disable create new line layers, after finished draw.
So I want to remove miClickCreateLineLayers property.
Go to Top of Page

xequte

38725 Posts

Posted - May 12 2019 :  21:15:30  Show Profile  Reply
Can you not disable line creation in the ImageEnViewLayerNotifyEx event, e.g.

procedure TMainForm.ImageEnView1LayerNotifyEx(Sender: TObject; layer: Integer; event: TIELayerEvent);
begin
  if event = ielCreated then
    ImageEnView1.MouseInteract := [ miEditLayerPoints ];
end;


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