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 convert selection to Polyline Layer?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Nov 13 2018 :  08:39:30  Show Profile  Reply
Hello,

I think this is already asked in distant past but I cannot find it on this forum.

I am using SelectNonAlpha to select the content of CurrentLayer.

Now I want to convert this selection to Polyline. How can I do this?

TIA


Yogi Yang

xequte

38496 Posts

Posted - Nov 13 2018 :  21:43:11  Show Profile  Reply
Hi Yogi

For layers, it is only available in the upcoming 8.1.2. You can use:

ImageEnView1.LayersCreatePolylineFromSelection(-1, true);

Email me if you want a pre-release.


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

yogiyang

India
727 Posts

Posted - Nov 15 2018 :  01:15:36  Show Profile  Reply
Hello Nigel,

Till you release the upcoming update, I am trying a workaround but am not able to. Here is the code that I am trying:
ieStyle.LockUpdate;
ieStyle.SelectNonAlpha();
SetLength( PolySelArray, ieStyle.PolySelCount );
for I := 0 to ieStyle.PolySelCount - 1 do
    PolySelArray[ I ] := ieStyle.PolySel[ I ];
lyr := TIEPolylineLayer( ieStyle.CurrentLayer);
lyr.ClearAllPoints;
for I := 0 to ieStyle.PolySelCount - 1 do
    lyr.AddPoint(PolySelArray[ I ]);

What I am getting is a rectangle shape PolyLine?!?!??!

Is there any way to solve this?

TIA


Yogi Yang
Go to Top of Page

xequte

38496 Posts

Posted - Nov 15 2018 :  16:02:31  Show Profile  Reply
Hi Yogi

8.1.2 should be out within two weeks. Or just email me for the new method.

Regarding your code, what is the value of PolySelCount?

Also, PolySel points are in bitmap coordinates, whereas as Layer points are in the range 0 - 1000. So you need to pass the parameter iepbBitmap:

lyr.AddPoint(PolySelArray[ I ], iepbBitmap)


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