/// <summary>
 /// Draws an unfilled polygon.
 /// </summary>
 /// <param name="primitives"></param>
 /// <param name="color"></param>
 /// <param name="polygon"></param>
 public static void DrawPolygon(this IPrimitiveRenderer primitives, Effect effect, Color color, Polygon polygon)
 {
     primitives.DrawLines(effect, LineType.Polygon, color, polygon.Points);
 }
 /// <summary>
 /// Draws the outline of an ellipse, inscribed inside a rectangle.
 /// </summary>
 /// <param name="primitives"></param>
 /// <param name="color"></param>
 /// <param name="boundingRect">The rectangle the circle should be inscribed in.</param>
 public static void DrawEllipse(this IPrimitiveRenderer primitives, Effect effect, Color color, RectangleF boundingRect)
 {
     primitives.DrawLines(effect, LineType.Polygon, color,
                          new EllipseBuilder().BuildEllipse(boundingRect));
 }
 /// <summary>
 ///     Draws a line between the two points specified.
 /// </summary>
 /// <param name="primitives"></param>
 /// <param name="color"></param>
 /// <param name="a"></param>
 /// <param name="b"></param>
 public static void DrawLine(this IPrimitiveRenderer primitives, Effect effect, Color color, Vector2 a, Vector2 b)
 {
     primitives.DrawLines(effect, LineType.LineSegments, color, new[] { a, b });
 }
 /// <summary>
 /// Draws the outline of a rectangle.
 /// </summary>
 /// <param name="primitives"></param>
 /// <param name="color"></param>
 /// <param name="rect"></param>
 public static void DrawRect(this IPrimitiveRenderer primitives, Effect effect, Color color, RectangleF rect)
 {
     primitives.DrawLines(effect, LineType.Polygon, color,
                          new QuadrilateralBuilder().BuildRectangle(rect));
 }
 /// <summary>
 /// Draws a set of lines. The lineType parameter controls how
 /// lines are connected.
 /// </summary>
 /// <param name="lineType">The type of lines to draw.</param>
 /// <param name="color">The color of lines to draw.</param>
 /// <param name="points">The points that are used to
 /// build the individual line segments.</param>
 public static void DrawLines(this IPrimitiveRenderer primitives, Effect effect, LineType lineType, Color color,
                              IEnumerable <Vector2> points)
 {
     primitives.DrawLines(effect, lineType, color, points);
 }