本文整理汇总了C#中System.Drawing.Graphics.FillPie方法的典型用法代码示例。如果您正苦于以下问题:C# Graphics.FillPie方法的具体用法?C# Graphics.FillPie怎么用?C# Graphics.FillPie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Graphics
的用法示例。
在下文中一共展示了Graphics.FillPie方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillPieRectangle
public void FillPieRectangle(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create rectangle for ellipse.
Rectangle rect = new Rectangle(0, 0, 200, 100);
// Create start and sweep angles.
float startAngle = 0.0F;
float sweepAngle = 45.0F;
// Fill pie to screen.
e.Graphics.FillPie(redBrush, rect, startAngle, sweepAngle);
}
示例2: FillPieInt
public void FillPieInt(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create location and size of ellipse.
int x = 0;
int y = 0;
int width = 200;
int height = 100;
// Create start and sweep angles.
int startAngle = 0;
int sweepAngle = 45;
// Fill pie to screen.
e.Graphics.FillPie(redBrush, x, y, width, height, startAngle, sweepAngle);
}
示例3: FillPieFloat
public void FillPieFloat(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create location and size of ellipse.
float x = 0.0F;
float y = 0.0F;
float width = 200.0F;
float height = 100.0F;
// Create start and sweep angles.
float startAngle = 0.0F;
float sweepAngle = 45.0F;
// Fill pie to screen.
e.Graphics.FillPie(redBrush, x, y, width, height, startAngle, sweepAngle);
}