OsmSharp / ui

The UI components.
http://osmsharp.com/
GNU General Public License v2.0
139 stars 91 forks source link

BoxF2D's line enumerator lines are not as expected #265

Open cmberryau opened 8 years ago

cmberryau commented 8 years ago

If you were to draw the lines from BoxF2D's line enumerator they form a bow-tie and not a box. Perhaps a rearrangement of BoxF2D.Corners? To make it a consistent winding?

Current order: [1][3] [0][2]

When BoxF2D's line enumerator looks like this:

lines.Add (new LineF2D (this.Corners [0], this.Corners [1], true));
lines.Add (new LineF2D (this.Corners [1], this.Corners [2], true));
lines.Add (new LineF2D (this.Corners [2], this.Corners [3], true));
lines.Add (new LineF2D (this.Corners [3], this.Corners [0], true));

You get a bow tie result rather than a box.

Perhaps should be: [1][2] [0][3]

Maybe it's by design, but I thought it's worth asking/mentioning.