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 get SelPoints of....?

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 23 2018 : 05:23:11
Hello,

I am using following code to select the content of a layer:

if ImageEnViewMain.LayersCurrent > 0 then
   ImageEnViewMain.SelectNonAlpha();

This will create a selection around the content of selection.

Now I want to retrieve the selection points so I am trying to use following code:

for I := 0 to ImageEnViewMain.PolySelCount - 1 do
begin
    MyPolySelArray[ I ] := ImageEnViewMain.PolySel;
end;

But ImageEnViewMain.PolySelCount always comes up as Zero!

So how can we get the point of selection created using [i]SelectNonAlpha
?

TIA


Yogi Yang
2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 30 2018 : 20:10:13
Hi Yogi

Because of the way SelectNonAlpha() works, it produces a non-vectorial selection (i.e. a selection represented by a bitmap, rather than a path of vertices).

It is rarely practical to convert a bitmap into a vector.

To determine which pixels are selected, you can use IsPointInsideSelection, e.g.

procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  if ImageEnView1.IsPointInsideSelection(X, Y) then
    memo1.Lines.add(format('%d %d is selected', [X, Y]));
end; 


Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Nov 27 2018 : 23:23:16
Hello Nigel,

 
3. Polyline layers can be created from a selection

Now that there is a feature to create Polyline from selection in 8.1.2, there should be some way to get array of selection points.

Can you please help solve this quickly.

TIA


Yogi Yang