ConvertEllipse() public static method

Converts a Rectangle into a Ellipse.
public static ConvertEllipse ( Math ellipse ) : SharpDX.Direct2D1.Ellipse
ellipse Math The Ellipse.
return SharpDX.Direct2D1.Ellipse
Ejemplo n.º 1
0
        /// <summary>
        /// Draws a Ellipse.
        /// </summary>
        /// <param name="pen">The Pen.</param>
        /// <param name="ellipse">The Ellipse.</param>
        public void DrawEllipse(Pen pen, Ellipse ellipse)
        {
            var dxPen = pen.Instance as DirectXPen;

            if (dxPen == null)
            {
                throw new ArgumentException("DirectX11 expects a DirectXPen as resource.");
            }
            DirectXHelper.RenderTarget.DrawEllipse(DirectXHelper.ConvertEllipse(ellipse), dxPen.GetPen(), dxPen.Width);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Fills a Ellipse.
 /// </summary>
 /// <param name="color">The Color.</param>
 /// <param name="ellipse">The Ellipse.</param>
 public void FillEllipse(Color color, Ellipse ellipse)
 {
     DirectXHelper.RenderTarget.FillEllipse(DirectXHelper.ConvertEllipse(ellipse),
                                            new SolidColorBrush(DirectXHelper.RenderTarget, DirectXHelper.ConvertColor(color)));
 }