Graphics.FillClosedCurve 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
填充由 Point 结构数组定义的闭合基线曲线的内部。
重载
FillClosedCurve(Brush, Point[]) |
填充由 Point 结构数组定义的闭合基线曲线的内部。 |
FillClosedCurve(Brush, PointF[]) |
填充由 PointF 结构数组定义的闭合基线曲线的内部。 |
FillClosedCurve(Brush, ReadOnlySpan<Point>) | |
FillClosedCurve(Brush, ReadOnlySpan<PointF>) | |
FillClosedCurve(Brush, Point[], FillMode) |
使用指定的填充模式填充由 Point 结构数组定义的封闭基数样条曲线的内部。 |
FillClosedCurve(Brush, PointF[], FillMode) |
使用指定的填充模式填充由 PointF 结构数组定义的封闭基数样条曲线的内部。 |
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode) | |
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode) | |
FillClosedCurve(Brush, Point[], FillMode, Single) |
使用指定的填充模式和紧张度填充由 Point 结构数组定义的封闭基线曲线的内部。 |
FillClosedCurve(Brush, PointF[], FillMode, Single) |
使用指定的填充模式和紧张度填充由 PointF 结构数组定义的封闭基线曲线的内部。 |
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single) | |
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single) |
FillClosedCurve(Brush, Point[])
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
填充由 Point 结构数组定义的闭合基线曲线的内部。
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::Point> ^ points);
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ... cli::array <System::Drawing::Point> ^ points);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.Point[] points);
public void FillClosedCurve (System.Drawing.Brush brush, params System.Drawing.Point[] points);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.Point[] -> unit
Public Sub FillClosedCurve (brush As Brush, points As Point())
Public Sub FillClosedCurve (brush As Brush, ParamArray points As Point())
参数
例外
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
创建纯红色画笔。
创建四个点的数组以定义样条。
填充屏幕上的曲线。
曲线的默认紧张度为 0.5。
public:
void FillClosedCurvePoint( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
//Create array of points for curve.
Point point1 = Point(100,100);
Point point2 = Point(200,50);
Point point3 = Point(250,200);
Point point4 = Point(50,150);
array<Point>^ points = {point1,point2,point3,point4};
// Fill curve on screen.
e->Graphics->FillClosedCurve( redBrush, points );
}
public void FillClosedCurvePoint(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
//Create array of points for curve.
Point point1 = new Point(100, 100);
Point point2 = new Point(200, 50);
Point point3 = new Point(250, 200);
Point point4 = new Point(50, 150);
Point[] points = {point1, point2, point3, point4};
// Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points);
}
Public Sub FillClosedCurvePoint(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
'Create array of points for curve.
Dim point1 As New Point(100, 100)
Dim point2 As New Point(200, 50)
Dim point3 As New Point(250, 200)
Dim point4 As New Point(50, 150)
Dim points As Point() = {point1, point2, point3, point4}
' Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points)
End Sub
注解
此方法填充通过数组中每个点的封闭基样线的内部。 如果最后一个点与第一个点不匹配,则会将一个额外的曲线段从最后一个点添加到第一个点以关闭它。
点数组必须至少包含四个 Point 结构。
此方法使用默认的 0.5 紧张。
适用于
FillClosedCurve(Brush, PointF[])
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
填充由 PointF 结构数组定义的闭合基线曲线的内部。
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::PointF> ^ points);
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ... cli::array <System::Drawing::PointF> ^ points);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.PointF[] points);
public void FillClosedCurve (System.Drawing.Brush brush, params System.Drawing.PointF[] points);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.PointF[] -> unit
Public Sub FillClosedCurve (brush As Brush, points As PointF())
Public Sub FillClosedCurve (brush As Brush, ParamArray points As PointF())
参数
例外
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
创建纯红色画笔。
创建四个点的数组以定义样条。
填充屏幕上的曲线。
曲线的默认紧张度为 0.5。
public:
void FillClosedCurvePointF( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
//Create array of points for curve.
PointF point1 = PointF(100.0F,100.0F);
PointF point2 = PointF(200.0F,50.0F);
PointF point3 = PointF(250.0F,200.0F);
PointF point4 = PointF(50.0F,150.0F);
array<PointF>^ points = {point1,point2,point3,point4};
// Fill curve on screen.
e->Graphics->FillClosedCurve( redBrush, points );
}
public void FillClosedCurvePointF(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
//Create array of points for curve.
PointF point1 = new PointF(100.0F, 100.0F);
PointF point2 = new PointF(200.0F, 50.0F);
PointF point3 = new PointF(250.0F, 200.0F);
PointF point4 = new PointF(50.0F, 150.0F);
PointF[] points = {point1, point2, point3, point4};
// Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points);
}
Public Sub FillClosedCurvePointF(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
'Create array of points for curve.
Dim point1 As New PointF(100.0F, 100.0F)
Dim point2 As New PointF(200.0F, 50.0F)
Dim point3 As New PointF(250.0F, 200.0F)
Dim point4 As New PointF(50.0F, 150.0F)
Dim points As PointF() = {point1, point2, point3, point4}
' Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points)
End Sub
注解
此方法填充通过数组中每个点的封闭基样线的内部。 如果最后一个点与第一个点不匹配,则会将一个额外的曲线段从最后一个点添加到第一个点以关闭它。
点数组必须至少包含四个 PointF 结构。
此方法使用默认的 0.5 紧张。
适用于
FillClosedCurve(Brush, ReadOnlySpan<Point>)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points);
public void FillClosedCurve (System.Drawing.Brush brush, scoped ReadOnlySpan<System.Drawing.Point> points);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of Point))
参数
- brush
- Brush
- points
- ReadOnlySpan<Point>
适用于
FillClosedCurve(Brush, ReadOnlySpan<PointF>)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points);
public void FillClosedCurve (System.Drawing.Brush brush, scoped ReadOnlySpan<System.Drawing.PointF> points);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of PointF))
参数
- brush
- Brush
- points
- ReadOnlySpan<PointF>
适用于
FillClosedCurve(Brush, Point[], FillMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
使用指定的填充模式填充由 Point 结构数组定义的封闭基数样条曲线的内部。
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::Point> ^ points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.Point[] points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.Point[] * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As Point(), fillmode As FillMode)
参数
例外
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
创建纯红色画笔。
创建四个点的数组以定义样条。
将填充模式设置为 Winding。
填充屏幕上的曲线。
曲线的默认紧张度为 0.5。
public:
void FillClosedCurvePointFillMode( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
//Create array of points for curve.
Point point1 = Point(100,100);
Point point2 = Point(200,50);
Point point3 = Point(250,200);
Point point4 = Point(50,150);
array<Point>^ points = {point1,point2,point3,point4};
// Set fill mode.
FillMode newFillMode = FillMode::Winding;
// Fill curve on screen.
e->Graphics->FillClosedCurve( redBrush, points, newFillMode );
}
public void FillClosedCurvePointFillMode(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
//Create array of points for curve.
Point point1 = new Point(100, 100);
Point point2 = new Point(200, 50);
Point point3 = new Point(250, 200);
Point point4 = new Point(50, 150);
Point[] points = {point1, point2, point3, point4};
// Set fill mode.
FillMode newFillMode = FillMode.Winding;
// Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode);
}
Public Sub FillClosedCurvePointFillMode(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
'Create array of points for curve.
Dim point1 As New Point(100, 100)
Dim point2 As New Point(200, 50)
Dim point3 As New Point(250, 200)
Dim point4 As New Point(50, 150)
Dim points As Point() = {point1, point2, point3, point4}
' Set fill mode.
Dim newFillMode As FillMode = FillMode.Winding
' Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode)
End Sub
注解
此方法填充通过数组中每个点的封闭基样线的内部。 如果最后一个点与第一个点不匹配,则会将一个额外的曲线段从最后一个点添加到第一个点以关闭它。
点数组必须至少包含四个 Point 结构。
此方法使用默认的 0.5 紧张。
适用于
FillClosedCurve(Brush, PointF[], FillMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
使用指定的填充模式填充由 PointF 结构数组定义的封闭基数样条曲线的内部。
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::PointF> ^ points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.PointF[] points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.PointF[] * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As PointF(), fillmode As FillMode)
参数
例外
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
创建纯红色画笔。
创建四个点的数组以定义样条。
将填充模式设置为 Winding。
填充屏幕上的曲线。
曲线的默认紧张度为 0.5。
public:
void FillClosedCurvePointFFillMode( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
// Create array of points for curve.
PointF point1 = PointF(100.0F,100.0F);
PointF point2 = PointF(200.0F,50.0F);
PointF point3 = PointF(250.0F,200.0F);
PointF point4 = PointF(50.0F,150.0F);
array<PointF>^ points = {point1,point2,point3,point4};
// Set fill mode.
FillMode newFillMode = FillMode::Winding;
// Fill curve on screen.
e->Graphics->FillClosedCurve( redBrush, points, newFillMode );
}
public void FillClosedCurvePointFFillMode(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create array of points for curve.
PointF point1 = new PointF(100.0F, 100.0F);
PointF point2 = new PointF(200.0F, 50.0F);
PointF point3 = new PointF(250.0F, 200.0F);
PointF point4 = new PointF(50.0F, 150.0F);
PointF[] points = {point1, point2, point3, point4};
// Set fill mode.
FillMode newFillMode = FillMode.Winding;
// Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode);
}
Public Sub FillClosedCurvePointFFillMode(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
' Create array of points for curve.
Dim point1 As New PointF(100.0F, 100.0F)
Dim point2 As New PointF(200.0F, 50.0F)
Dim point3 As New PointF(250.0F, 200.0F)
Dim point4 As New PointF(50.0F, 150.0F)
Dim points As PointF() = {point1, point2, point3, point4}
' Set fill mode.
Dim newFillMode As FillMode = FillMode.Winding
' Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode)
End Sub
注解
此方法填充通过数组中每个点的封闭基样线的内部。 如果最后一个点与第一个点不匹配,则会将一个额外的曲线段从最后一个点添加到第一个点以关闭它。
点数组必须至少包含四个 Point 结构。
此方法使用默认的 0.5 紧张。
适用于
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.Point> points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.Point> * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of Point), fillmode As FillMode)
参数
- brush
- Brush
- points
- ReadOnlySpan<Point>
- fillmode
- FillMode
适用于
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.PointF> points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.PointF> * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of PointF), fillmode As FillMode)
参数
- brush
- Brush
- points
- ReadOnlySpan<PointF>
- fillmode
- FillMode
适用于
FillClosedCurve(Brush, Point[], FillMode, Single)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
使用指定的填充模式和紧张度填充由 Point 结构数组定义的封闭基线曲线的内部。
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::Point> ^ points, System::Drawing::Drawing2D::FillMode fillmode, float tension);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.Point[] points, System.Drawing.Drawing2D.FillMode fillmode, float tension);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.Point[] * System.Drawing.Drawing2D.FillMode * single -> unit
Public Sub FillClosedCurve (brush As Brush, points As Point(), fillmode As FillMode, tension As Single)
参数
- tension
- Single
大于或等于 0.0F 的值,该值指定曲线的紧张度。
例外
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
创建纯红色画笔。
创建四个点的数组以定义样条。
将填充模式设置为 Winding。
将紧张度设置为 1.0。
填充屏幕上的曲线。
public:
void FillClosedCurvePointFillModeTension( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
// Create array of points for curve.
Point point1 = Point(100,100);
Point point2 = Point(200,50);
Point point3 = Point(250,200);
Point point4 = Point(50,150);
array<Point>^ points = {point1,point2,point3,point4};
// Set fill mode.
FillMode newFillMode = FillMode::Winding;
// Set tension.
float tension = 1.0F;
// Fill curve on screen.
e->Graphics->FillClosedCurve( redBrush, points, newFillMode, tension );
}
public void FillClosedCurvePointFillModeTension(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create array of points for curve.
Point point1 = new Point(100, 100);
Point point2 = new Point(200, 50);
Point point3 = new Point(250, 200);
Point point4 = new Point(50, 150);
Point[] points = {point1, point2, point3, point4};
// Set fill mode.
FillMode newFillMode = FillMode.Winding;
// Set tension.
float tension = 1.0F;
// Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension);
}
Public Sub FillClosedCurvePointFillModeTension(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
' Create array of points for curve.
Dim point1 As New Point(100, 100)
Dim point2 As New Point(200, 50)
Dim point3 As New Point(250, 200)
Dim point4 As New Point(50, 150)
Dim points As Point() = {point1, point2, point3, point4}
' Set fill mode.
Dim newFillMode As FillMode = FillMode.Winding
' Set tension.
Dim tension As Single = 1.0F
' Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension)
End Sub
注解
此方法填充通过数组中每个点的封闭基样线的内部。 如果最后一个点与第一个点不匹配,则会将一个额外的曲线段从最后一个点添加到第一个点以关闭它。
点数组必须至少包含四个 Point 结构。
tension
参数确定样条的形状。 如果 tension
参数的值为 0.0F,此方法将绘制直线段以连接点。 通常,tension
参数小于或等于 1.0F。 超过 1.0F 的值会产生异常结果。
适用于
FillClosedCurve(Brush, PointF[], FillMode, Single)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
使用指定的填充模式和紧张度填充由 PointF 结构数组定义的封闭基线曲线的内部。
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::PointF> ^ points, System::Drawing::Drawing2D::FillMode fillmode, float tension);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.PointF[] points, System.Drawing.Drawing2D.FillMode fillmode, float tension);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.PointF[] * System.Drawing.Drawing2D.FillMode * single -> unit
Public Sub FillClosedCurve (brush As Brush, points As PointF(), fillmode As FillMode, tension As Single)
参数
- tension
- Single
大于或等于 0.0F 的值,该值指定曲线的紧张度。
例外
示例
下面的代码示例设计用于 Windows 窗体,它需要 PaintEventArgse
,这是 Paint 事件处理程序的参数。 该代码执行以下操作:
创建纯红色画笔。
创建四个点的数组以定义样条。
将填充模式设置为 Winding。
将紧张度设置为 1.0。
填充屏幕上的曲线。
public:
void FillClosedCurvePointFFillModeTension( PaintEventArgs^ e )
{
// Create solid brush.
SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );
// Create array of points for curve.
PointF point1 = PointF(100.0F,100.0F);
PointF point2 = PointF(200.0F,50.0F);
PointF point3 = PointF(250.0F,200.0F);
PointF point4 = PointF(50.0F,150.0F);
array<PointF>^ points = {point1,point2,point3,point4};
// Set fill mode.
FillMode newFillMode = FillMode::Winding;
// Set tension.
float tension = 1.0F;
// Fill curve on screen.
e->Graphics->FillClosedCurve( redBrush, points, newFillMode, tension );
}
public void FillClosedCurvePointFFillModeTension(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create array of points for curve.
PointF point1 = new PointF(100.0F, 100.0F);
PointF point2 = new PointF(200.0F, 50.0F);
PointF point3 = new PointF(250.0F, 200.0F);
PointF point4 = new PointF(50.0F, 150.0F);
PointF[] points = {point1, point2, point3, point4};
// Set fill mode.
FillMode newFillMode = FillMode.Winding;
// Set tension.
float tension = 1.0F;
// Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension);
}
Public Sub FillClosedCurvePointFFillModeTension(ByVal e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
' Create array of points for curve.
Dim point1 As New PointF(100.0F, 100.0F)
Dim point2 As New PointF(200.0F, 50.0F)
Dim point3 As New PointF(250.0F, 200.0F)
Dim point4 As New PointF(50.0F, 150.0F)
Dim points As PointF() = {point1, point2, point3, point4}
' Set fill mode.
Dim newFillMode As FillMode = FillMode.Winding
' Set tension.
Dim tension As Single = 1.0F
' Fill curve on screen.
e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension)
End Sub
注解
此方法填充通过数组中每个点的封闭基样线的内部。 如果最后一个点与第一个点不匹配,则会将一个额外的曲线段从最后一个点添加到第一个点以关闭它。
点数组必须至少包含四个 Point 结构。
tension
参数确定样条的形状。 如果 tension
参数的值为 0.0F,此方法将绘制直线段以连接点。 通常,tension
参数小于或等于 1.0F。 超过 1.0F 的值会产生异常结果。
适用于
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points, System::Drawing::Drawing2D::FillMode fillmode, float tension);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.Point> points, System.Drawing.Drawing2D.FillMode fillmode, float tension);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.Point> * System.Drawing.Drawing2D.FillMode * single -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of Point), fillmode As FillMode, tension As Single)
参数
- brush
- Brush
- points
- ReadOnlySpan<Point>
- fillmode
- FillMode
- tension
- Single
适用于
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
public:
void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points, System::Drawing::Drawing2D::FillMode fillmode, float tension);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.PointF> points, System.Drawing.Drawing2D.FillMode fillmode, float tension);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.PointF> * System.Drawing.Drawing2D.FillMode * single -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of PointF), fillmode As FillMode, tension As Single)
参数
- brush
- Brush
- points
- ReadOnlySpan<PointF>
- fillmode
- FillMode
- tension
- Single