ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to convert selection to Polyline Layer?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Nov 13 2018 : 08:39:30
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
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 15 2018 : 16:02:31
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
yogiyang Posted - Nov 15 2018 : 01:15:36
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
xequte Posted - Nov 13 2018 : 21:43:11
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