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