We are having a problem with manually adding a GoPolygon object to a GoView document. We manually create a GoPolygon object and add it to the GoView.Document. When we add the points to the PointF collection and render it on the screen, if there is no point at 0,0 for the GoPolygon, the drawing is skewed (it seems to add this point and connect the line to it).
In this example it is an engineering drawing. The GoPolygons that we want to create do not have a 0,0 point within the bounds rectangle. Most, if not all of them, are angled and have a start point > 0,0.
Your thoughts on this are appreciated.
If you look at Demo1, you’ll see GoPolygon’s that don’t do this. Can you send us a small code sample that reproduces the problem?
Thank you for getting back to me so quickly. This is actually a developer error on my part.
PointF points = new PointF(); // C#
is not the same as
Dim points(5) as PointF ' VB.NET
The VB.NET version creates a 0 based array with 6 items, while the C# version creates a 0 based array with 5 items.
The extra point was being created with a default X and Y coordinate of (0,0). When I was building the sample, I did it in C# and it worked correctly with the same data.
Sorry about that.