Polygon or Polyline ??
-
- Posts: 6
- Joined: Thu Jul 10, 2008 4:31 pm
Polygon or Polyline ??
I noticed that in some cases Draw treats some polylines as polygons (when viewed in the content.xml file of the draw file) . Could someone help me out on what test it uses for a polyline to qualify as a polygon.
OOo 2.3.X on openSuse other + Microsoft Vista
- Hagar Delest
- Moderator
- Posts: 32658
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Polygon or Polyline ??
Are you sure it's a Macro question?
What have you in mind exactly?
What have you in mind exactly?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
-
- Posts: 6
- Joined: Thu Jul 10, 2008 4:31 pm
Re: Polygon or Polyline ??
I am working on something that involves interpreting the content.xml file that Draw constructs. I was having a few problems in this regard. I tried to use the method I use to draw polylines for polygons but I was not able to make the first and the last points the same and still, reading the aforementioned XML file, I found that Draw interprets it as a polygon rather than a polyline even though the first and last points were not the same....
So, I just wanted to know how Draw interprets a particular polyline(with end-points close but not the same) as a polygon.
So, I just wanted to know how Draw interprets a particular polyline(with end-points close but not the same) as a polygon.
OOo 2.3.X on openSuse other + Microsoft Vista
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Polygon or Polyline ??
Hi,
From the programming point of view, a broken line is created as an instance of the service com.sun.star.drawing.PolyLineShape.
The same broken line (with distinct start point and end point) becomes a closed polygon if it is created as an instance of the service com.sun.star.drawing.PolyPolygonShape.
______
Bernard
From the programming point of view, a broken line is created as an instance of the service com.sun.star.drawing.PolyLineShape.
The same broken line (with distinct start point and end point) becomes a closed polygon if it is created as an instance of the service com.sun.star.drawing.PolyPolygonShape.
______
Bernard