Graphics.FillClosedCurve 메서드

정의

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

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())

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

points
Point[]

스플라인을 정의하는 Point 구조체의 배열입니다.

예외

brush이(가) null인 경우

또는

points이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 4개의 점 배열을 만들어 스플라인을 정의합니다.

  • 화면의 곡선을 채웁니다.

곡선의 기본 장력은 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

설명

이 메서드는 배열의 각 지점을 통과하는 닫힌 카디널 스플라인의 내부를 채웁니다. 마지막 점이 첫 번째 점과 일치하지 않으면 마지막 지점에서 첫 번째 지점으로 추가 곡선 세그먼트가 추가되어 닫힙니다.

점 배열에는 4개 Point 이상의 구조체가 포함되어야 합니다.

이 메서드는 기본 장력 0.5를 사용합니다.

적용 대상

FillClosedCurve(Brush, PointF[])

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())

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

points
PointF[]

스플라인을 정의하는 PointF 구조체의 배열입니다.

예외

brush이(가) null인 경우

또는

points이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 4개의 점 배열을 만들어 스플라인을 정의합니다.

  • 화면의 곡선을 채웁니다.

곡선의 기본 장력은 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

설명

이 메서드는 배열의 각 지점을 통과하는 닫힌 카디널 스플라인의 내부를 채웁니다. 마지막 점이 첫 번째 점과 일치하지 않으면 마지막 지점에서 첫 번째 지점으로 추가 곡선 세그먼트가 추가되어 닫힙니다.

점 배열에는 4개 PointF 이상의 구조체가 포함되어야 합니다.

이 메서드는 기본 장력 0.5를 사용합니다.

적용 대상

FillClosedCurve(Brush, ReadOnlySpan<Point>)

Source:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points);
public void FillClosedCurve (System.Drawing.Brush brush, 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

적용 대상

FillClosedCurve(Brush, ReadOnlySpan<PointF>)

Source:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points);
public void FillClosedCurve (System.Drawing.Brush brush, 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

적용 대상

FillClosedCurve(Brush, Point[], FillMode)

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

points
Point[]

스플라인을 정의하는 Point 구조체의 배열입니다.

fillmode
FillMode

곡선이 채워지는 방법을 결정하는 FillMode 열거형의 멤버입니다.

예외

brush이(가) null인 경우

또는

points이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 4개의 점 배열을 만들어 스플라인을 정의합니다.

  • 채우기 모드를 로 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

설명

이 메서드는 배열의 각 지점을 통과하는 닫힌 카디널 스플라인의 내부를 채웁니다. 마지막 점이 첫 번째 점과 일치하지 않으면 마지막 지점에서 첫 번째 지점으로 추가 곡선 세그먼트가 추가되어 닫힙니다.

점 배열에는 4개 Point 이상의 구조체가 포함되어야 합니다.

이 메서드는 기본 장력 0.5를 사용합니다.

적용 대상

FillClosedCurve(Brush, PointF[], FillMode)

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

points
PointF[]

스플라인을 정의하는 PointF 구조체의 배열입니다.

fillmode
FillMode

곡선이 채워지는 방법을 결정하는 FillMode 열거형의 멤버입니다.

예외

brush이(가) null인 경우

또는

points이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 4개의 점 배열을 만들어 스플라인을 정의합니다.

  • 채우기 모드를 로 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

설명

이 메서드는 배열의 각 지점을 통과하는 닫힌 카디널 스플라인의 내부를 채웁니다. 마지막 점이 첫 번째 점과 일치하지 않으면 마지막 지점에서 첫 번째 지점으로 추가 곡선 세그먼트가 추가되어 닫힙니다.

점 배열에는 4개 Point 이상의 구조체가 포함되어야 합니다.

이 메서드는 기본 장력 0.5를 사용합니다.

적용 대상

FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode)

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
fillmode
FillMode

적용 대상

FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode)

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
fillmode
FillMode

적용 대상

FillClosedCurve(Brush, Point[], FillMode, Single)

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

points
Point[]

스플라인을 정의하는 Point 구조체의 배열입니다.

fillmode
FillMode

곡선이 채워지는 방법을 결정하는 FillMode 열거형의 멤버입니다.

tension
Single

곡선의 장력을 지정하는 0.0F 보다 크거나 같은 값입니다.

예외

brush이(가) null인 경우

또는

points이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 4개의 점 배열을 만들어 스플라인을 정의합니다.

  • 채우기 모드를 로 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

설명

이 메서드는 배열의 각 지점을 통과하는 닫힌 카디널 스플라인의 내부를 채웁니다. 마지막 점이 첫 번째 점과 일치하지 않으면 마지막 점부터 첫 번째 점까지 추가 곡선 세그먼트가 추가되어 닫힙니다.

점 배열에는 4개 Point 이상의 구조체가 포함되어야 합니다.

매개 변수는 tension 스플라인의 모양을 결정합니다. 매개 변수 값 tension 이 0.0F이면 이 메서드는 직선 세그먼트를 그려 지점을 연결합니다. 일반적으로 tension 매개 변수는 1.0F보다 작거나 같습니다. 1.0F를 넘는 값은 비정상적인 결과를 생성합니다.

적용 대상

FillClosedCurve(Brush, PointF[], FillMode, Single)

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

points
PointF[]

스플라인을 정의하는 PointF 구조체의 배열입니다.

fillmode
FillMode

곡선이 채워지는 방법을 결정하는 FillMode 열거형의 멤버입니다.

tension
Single

곡선의 장력을 지정하는 0.0F 보다 크거나 같은 값입니다.

예외

brush이(가) null인 경우

또는

points이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 4개의 점 배열을 만들어 스플라인을 정의합니다.

  • 채우기 모드를 로 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

설명

이 메서드는 배열의 각 지점을 통과하는 닫힌 카디널 스플라인의 내부를 채웁니다. 마지막 점이 첫 번째 점과 일치하지 않으면 마지막 점부터 첫 번째 점까지 추가 곡선 세그먼트가 추가되어 닫힙니다.

점 배열에는 4개 Point 이상의 구조체가 포함되어야 합니다.

매개 변수는 tension 스플라인의 모양을 결정합니다. 매개 변수 값 tension 이 0.0F이면 이 메서드는 직선 세그먼트를 그려 지점을 연결합니다. 일반적으로 tension 매개 변수는 1.0F보다 작거나 같습니다. 1.0F를 넘는 값은 비정상적인 결과를 생성합니다.

적용 대상

FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single)

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
fillmode
FillMode
tension
Single

적용 대상

FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single)

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
fillmode
FillMode
tension
Single

적용 대상