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
 Iterate ieVect polygon objects - get/set X,Y
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
159 Posts

Posted - Apr 23 2016 :  20:46:06  Show Profile  Reply
Please show me how to iterate ImageEnVect Polygon Objects reading each objects Point X,Y values and changing and saving the Point X,Y values.

for i:= 0 to ieVect.ObjectCount-1 do begin
  if ieVect.Object[i] = Polygon then begin
    for j:= 0 to ieVect.Object[i].PointsCount-1 do begin
      ieVect.Object[i].Points[j].X:= ieVect.Object[i].Points[j].X+10;
    end;
  end;
end;

Thanks



Andy

w2m

USA
1990 Posts

Posted - Apr 25 2016 :  08:56:13  Show Profile  Reply
Try:
TImageEnVect.SetObjPolylinePoints

Declaration
procedure SetObjPolylinePoints(hobj: integer; Points: array of TPoint);

Description
SetObjPolylinePoints specifies the points that compose the polyline for the polyline object hobj.
The points are specified in bitmap coordinates.

hobj is the ID of the object. You can also specify IEV_NEXT_INSERTED_OBJECT (-1) which refers to the next object to be inserted or IEV_PREVIOUS_INSERTED_OBJECT (-2) for the last object inserted.

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

andyhill

Australia
159 Posts

Posted - Apr 25 2016 :  17:53:29  Show Profile  Reply
Bill, I understand that but how do I get the points ?

GetObjPolylinePoints



Andy
Go to Top of Page

xequte

39064 Posts

Posted - Apr 25 2016 :  23:55:21  Show Profile  Reply
Hi Andy,

Please see ObjPolylinePoints:

http://www.imageen.com/help/TImageEnVect.ObjPolylinePoints.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

andyhill

Australia
159 Posts

Posted - Apr 26 2016 :  22:13:31  Show Profile  Reply
Thanks, I had expected fetching a TPoint array but I can do it one point at a time if I must.

Andy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: