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
 Add and DeleteTImageEnVect Polyline Points
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

w2m

USA
1990 Posts

Posted - Feb 19 2016 :  10:22:06  Show Profile  Reply
I searched the forum and can not find info about adding points to or removing a point from a polygon object. Also there is nothing in the help file about AddSelPoint or DelLastSelPoint and nothing that I can find in the demos.

How do you add a point to a polyline?
How do you delete a point from a polyline?

This does not work:
Popupmenu -
procedure TForm1.EditPolylinePoints1Click(Sender: TObject);
begin
  { edit polyline points }
  ImageEnVect1.MouseInteractVt := [miEditPolyLine];
end;

Popupmenu -
procedure TForm1.AddPoint1Click(Sender: TObject);
var
  iPoint: TPoint;
begin
  iPoint := ScreenToClient(Mouse.CursorPos);
  ImageEnVect1.AddSelPoint(iPoint.X, iPoint.Y);
  ImageEnVect1.Update;
  // point is not added? 
end;

Popupmenu -
procedure TForm1.DeletePoint1Click(Sender: TObject);
begin
  ImageEnVect1.DelLastSelPoint;
  ImageEnVect1.Update;
  // point is not deleted?
end;

I also see a AddPolyLinePoint(hobj: integer; X, Y: integer) method but it is protected and there is no DeletePolyLinePoint(hobj: integer; X, Y: integer) at all and there are no other public methods I can find to add and remove points.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development

xequte

38610 Posts

Posted - Feb 21 2016 :  19:09:12  Show Profile  Reply
Hi Bill

AddSelPoint and DelLastSelPoint are for editing the points of a complex selection.

To edit points of a polyline, please download the latest version from the Git Respository and use AddPolyLinePoint/RemovePolyLinePoint.

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