本文整理汇总了C#中System.Drawing.Graphics.DrawBezier方法的典型用法代码示例。如果您正苦于以下问题:C# Graphics.DrawBezier方法的具体用法?C# Graphics.DrawBezier怎么用?C# Graphics.DrawBezier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Graphics
的用法示例。
在下文中一共展示了Graphics.DrawBezier方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawBezierPoint
private void DrawBezierPoint(PaintEventArgs e)
{
// Create pen.
Pen blackPen = new Pen(Color.Black, 3);
// Create points for curve.
Point start = new Point(100, 100);
Point control1 = new Point(200, 10);
Point control2 = new Point(350, 50);
Point end = new Point(500, 100);
// Draw arc to screen.
e.Graphics.DrawBezier(blackPen, start, control1, control2, end);
}
示例2: DrawBezierPointF
private void DrawBezierPointF(PaintEventArgs e)
{
// Create pen.
Pen blackPen = new Pen(Color.Black, 3);
// Create points for curve.
PointF start = new PointF(100.0F, 100.0F);
PointF control1 = new PointF(200.0F, 10.0F);
PointF control2 = new PointF(350.0F, 50.0F);
PointF end = new PointF(500.0F, 100.0F);
// Draw arc to screen.
e.Graphics.DrawBezier(blackPen, start, control1, control2, end);
}
示例3: DrawBezierFloat
private void DrawBezierFloat(PaintEventArgs e)
{
// Create pen.
Pen blackPen = new Pen(Color.Black, 3);
// Create coordinates of points for curve.
float startX = 100.0F;
float startY = 100.0F;
float controlX1 = 200.0F;
float controlY1 = 10.0F;
float controlX2 = 350.0F;
float controlY2 = 50.0F;
float endX = 500.0F;
float endY = 100.0F;
// Draw arc to screen.
e.Graphics.DrawBezier(blackPen, startX, startY,
controlX1, controlY1,
controlX2, controlY2,
endX, endY);
}