public static void Draw( this SKCanvas canvas, SKImageInfo info, ICollection <CelestialDrawModel> shapes, ObjectCollectionLayout objectCollectionLayout) { if (!shapes.Any()) { return; } if (shapes.Count == 2) { var shapeList = shapes.ToList(); var origin = shapeList.First(); var compare = shapeList.Last(); canvas.DrawCompare(info, origin, compare); } else { var orbits = shapes.Where(x => x.BorderColor.HasValue); var drawParameters = GetDrawParameters(info, orbits, objectCollectionLayout); canvas.DrawOrbits(shapes.Where(x => x.BorderColor.HasValue), drawParameters); canvas.DrawBodies(shapes.Where(x => !x.BorderColor.HasValue), drawParameters); } }