/// <summary> /// Creates ellipse as drawing object. /// </summary> /// <param name="graphics"><see cref="IGraphics"/> object.</param> /// <param name="penColor">Pen color.</param> /// <param name="left">Left coordinate of top left corner.</param> /// <param name="top">Top coordinate of top left corner.</param> /// <param name="width">Ellipse rectangle width.</param> /// <param name="height">Ellipse rectangle height.</param> /// <param name="rotation">Ellipse clockwise rotation in radians.</param> /// <param name="fillBrushColor">Color of the brush used to fill the content.</param> /// <param name="penThickness">Pen thickness.</param> /// <returns>Ellipse as drawing object.</returns> public static IEllipse CreateEllipse(this IGraphics graphics, Color penColor, double left, double top, double width, double height, double rotation, Color fillBrushColor, double penThickness = 1) { IPen pen = CreatePen(graphics, penColor, penThickness); IBrush brush = graphics.CreateSolidColorBrush(fillBrushColor); return(graphics.CreateEllipse(pen, left, top, width, height, rotation, brush)); }
/// <summary> /// Creates ellipse as drawing object. /// </summary> /// <param name="graphics"><see cref="IGraphics"/> object.</param> /// <param name="penColor">Pen color.</param> /// <param name="left">Left coordinate of top left corner.</param> /// <param name="top">Top coordinate of top left corner.</param> /// <param name="width">Ellipse rectangle width.</param> /// <param name="height">Ellipse rectangle height.</param> /// <param name="rotation">Ellipse clockwise rotation in radians.</param> /// <param name="penThickness">Pen thickness.</param> /// <returns>Ellipse as drawing object.</returns> public static IEllipse CreateEllipse(this IGraphics graphics, Color penColor, double left, double top, double width, double height, double rotation = 0, double penThickness = 1) { IPen pen = CreatePen(graphics, penColor, penThickness); return(graphics.CreateEllipse(pen, left, top, width, height, rotation)); }