private void DrawErrorPosition(PositionAssociationView pav, DisplayablePosition.ErrorMarker errorMarker, Pen pen, Brush brush, PaintSpecification e) { ErrorPosition errorPosition = pav.position.GetErrorPosition(errorMarker); if (errorPosition == null) { return; } PointF pointF = MapPositionToPoint(pav.position.pinPosition.latlon); PointF pointF2 = MapPositionToPoint(errorPosition.latlon); RectangleF rectangleF = new RectangleF(e.ClipRectangle.X - e.ClipRectangle.Width * 2, e.ClipRectangle.Y - e.ClipRectangle.Height * 2, e.ClipRectangle.Width * 5, e.ClipRectangle.Height * 5); if (!rectangleF.Contains(pointF) || !rectangleF.Contains(pointF2)) { return; } if (!pav.position.invertError) { e.Graphics.DrawLine(pen, pointF, pointF2); e.Graphics.FillEllipse(brush, pointF2.X - 6f, pointF2.Y - 6f, 12f, 12f); return; } e.Graphics.DrawEllipse(pen, pointF.X - 20f, pointF.Y - 20f, 40f, 40f); }
public void SetErrorPosition(ErrorMarker errorMarker, LatLon errorPosition) { _errorPositions[(int)errorMarker] = new ErrorPosition(errorPosition); }