System.Drawing.Drawing2D.GraphicsPath.AddPie C# (CSharp) Method

AddPie() public method

public AddPie ( Rectangle rect, float startAngle, float sweepAngle ) : void
rect Rectangle
startAngle float
sweepAngle float
return void
        public void AddPie(Rectangle rect, float startAngle, float sweepAngle)
        {
            AddPie ((float)rect.X, (float)rect.Y, (float)rect.Width, (float)rect.Height, startAngle, sweepAngle);
        }

Same methods

GraphicsPath::AddPie ( float x, float y, float width, float height, float startAngle, float sweepAngle ) : void
GraphicsPath::AddPie ( int x, int y, int width, int height, float startAngle, float sweepAngle ) : void

Usage Example

Exemplo n.º 1
0
        public override GraphicsPath getGraphicsPathNoOffsetRoute()
        {
            GraphicsPath path = new GraphicsPath();
            RectangleF rect = getRect();
            try
            {
                path.AddPie(rect.X, rect.Y, rect.Width, rect.Height, StartAngle, EndAngle);
            }
            catch (Exception ex)
            {

                rect.X = _X + _XAdd;
                rect.Y = _Y + _YAdd;
                rect.Width = 10;
                rect.Height = 10;
                path.AddPie(rect.X, rect.Y, rect.Width, rect.Height, StartAngle, EndAngle);
                ////ClsErrorFile.WriteLine("这里是一个扇形出现参数错误,异常处理是构造一个默认宽和高都是10,角度为0和90的扇形", ex);
                //throw;

                //throw;
            }

            return path;
            //return base.getGraphicsPath();
        }
All Usage Examples Of System.Drawing.Drawing2D.GraphicsPath::AddPie