本文整理匯總了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);
}