Repository navigation
Be able to close a line into a polygon #4260
Replies: 4 comments 1 reply
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
I would appreciate it if anyone could share a hack for getting this to work. I am willing to help with the implementation; I just don't know how to enter the definition of the shape (beyond defining some JSON parameters for their styles). |
|
A hack I've considered is to use the You can paste the style above to obtain this shape : |
|
Closing a line into a polygon in draw.io has a workaround, though it's not as direct as dedicated vector tools: Method 1: Use the Polygon shape directly
Method 2: Draw and close manually
Method 3: Convert an open path to closed
Method 4: Polyline to polygon via XML <mxCell style="shape=mxgraph.cisco.cisco_safe.attack;..." vertex="1">
<mxGeometry ... as="geometry">
<Array as="points">
<mxPoint x="100" y="100"/>
<mxPoint x="200" y="50"/>
<mxPoint x="300" y="100"/>
<!-- First and last point the same = closed -->
</Array>
</mxGeometry>
</mxCell>The cleanest approach for architectural diagrams is Method 1 — start with a polygon shape and adjust vertices, rather than trying to close a line. |

Uh oh!
There was an error while loading. Please reload this page.
Hi,
If I draw a line that has a start and end-point at the same position, I would like Draw.io to convert that line into a polygon (with an optional fill, etc.)
Once that polygon has been created, I would like to still be able to modify that polygon using the same node-point modifiers that were available when it was a line.
This would allow the creation of basic custom shapes (polygons).
Here's a step-by-step summary of how I would see the user making use of it.

All reactions