ConvertEllipse() public static method

Converts the Rectangle.
public static ConvertEllipse ( Math ellipse ) : Ellipse
ellipse Math The Ellipse.
return Ellipse
Exemplo 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("DirectX10 expects a DirectXPen as resource.");
            }

            _renderTarget.DrawEllipse(dxPen.GetPen(), DirectXHelper.ConvertEllipse(ellipse));
        }
Exemplo 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)
 {
     _renderTarget.FillEllipse(new SolidColorBrush(_renderTarget, DirectXHelper.ConvertColor(color)),
                               DirectXHelper.ConvertEllipse(ellipse));
 }