This project is read-only.

StackOverflowException on PolarGraphics.ToPointF


Hello everyone,
first of all thanks for releasing this amazing library through CodePlex.
I've noticed that on GeoFramework.Drawing.PolarGraphics class, the method ToPointF(PolarCoordinate coordinate) can cause a StackOverFlowException:
182: public PointF ToPointF(PolarCoordinate coordinate)
183: {
184: return ToPointF(coordinate);
185: }
To solve it I've changed to:
184: return coordinate.ToPointF();
In your opinion, is this the right way?


tidyup wrote Apr 28, 2010 at 1:47 PM

See the GPS 3.0 issue on the same topic copied below.

The suggested solution is not corect. It will cause problems for Draw PolarGraphics.DrawRotatedString. Try this instead:

/// <summary>Converts a polar coordinate to a precise pixel coordinate.</summary>
public PointF ToPointF(PolarCoordinate coordinate)
return ToPointF(ToPointD(coordinate)); //fixes problems with DrawRotatedString

wrote Feb 14, 2013 at 3:49 AM