public void Draw(Graphics graphics, RectangleD cameraBounds, IMapRenderable orbitingBody)
{
var traceBounds = new List<RectangleF>();
for (int i = 1; i < _points.Count; i++)
{
DVector2 orbitPoint = _points[i];
if (cameraBounds.Contains(orbitPoint))
{
PointF localPoint = RenderUtils.WorldToScreen(orbitPoint, cameraBounds);
if (i == _apogeeIndex && i > 1)
{
RenderApogee(graphics, localPoint);
}
else if (i == _perigeeIndex)
{
RenderPerigee(graphics, localPoint);
}
else
{
traceBounds.Add(new RectangleF(localPoint.X, localPoint.Y, 2, 2));
}
}
}
if (_points.Count > 0 && cameraBounds.Contains(_points[0]))
{
RenderStart(graphics, cameraBounds, orbitingBody, _points[0]);
}
RenderUtils.DrawRectangles(graphics, traceBounds, orbitingBody.IconColor);
}