Share via


LinearGradientBrush.SetSigmaBellShape 메서드

정의

종 모양의 곡선을 기반으로 그라데이션 대칭을 만듭니다.

오버로드

SetSigmaBellShape(Single)

종 모양의 곡선을 기반으로 그라데이션 대칭을 만듭니다.

SetSigmaBellShape(Single, Single)

종 모양의 곡선을 기반으로 그라데이션 대칭을 만듭니다.

SetSigmaBellShape(Single)

Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs

종 모양의 곡선을 기반으로 그라데이션 대칭을 만듭니다.

public:
 void SetSigmaBellShape(float focus);
public void SetSigmaBellShape (float focus);
member this.SetSigmaBellShape : single -> unit
Public Sub SetSigmaBellShape (focus As Single)

매개 변수

focus
Single

시작 색과 끝 색이 똑같이 혼합되어 있는 지점인 그라데이션 가운데를 지정하는 0에서 1 사이의 값입니다.

예제

예제는 다음을 참조하세요. SetSigmaBellShape.

설명

이 메서드는 focus그라데이션이 끝 색으로만 구성된 지점인 를 지정합니다. 매개 변수는 focus 그라데이션 선을 따라 거리의 비율로 위치를 나타냅니다. 그라데이션은 양쪽에 종 곡선 모양(일반 분포)에 따라 시작 색으로 떨어집니다.

적용 대상

SetSigmaBellShape(Single, Single)

Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs

종 모양의 곡선을 기반으로 그라데이션 대칭을 만듭니다.

public:
 void SetSigmaBellShape(float focus, float scale);
public void SetSigmaBellShape (float focus, float scale);
member this.SetSigmaBellShape : single * single -> unit
Public Sub SetSigmaBellShape (focus As Single, scale As Single)

매개 변수

focus
Single

그라데이션이 끝 색으로만 구성된 지점인 그라데이션 가운데를 지정하는 0에서 100 사이의 값입니다.

scale
Single

focus에서 색이 대칭을 이루는 속도를 지정하는 0에서 1 사이의 값입니다.

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 개체인 이 OnPaint 필요합니다PaintEventArgse. 코드는 다음 작업을 수행합니다.

  • LinearGradientBrush를 만듭니다.

  • 이 브러시를 사용하여 선형의 왼쪽에서 오른쪽으로 색이 전환된 화면에 타원을 그립니다.

  • LinearGradientBrush 를 변환하여 가운데에 피크가 있는 종 모양의 곡선을 만듭니다.

  • 종 모양의 브러시를 사용하여 화면에 두 번째 타원을 그립니다.

아래쪽 타원의 그라데이션이 파란색에서 빨간색으로 전환된 다음 다시 파란색으로 전환됩니다.

private:
   void SetSigmaBellShapeExample( PaintEventArgs^ e )
   {
      // Create a LinearGradientBrush.
      Rectangle myRect = Rectangle(20,20,200,100);
      LinearGradientBrush^ myLGBrush = gcnew LinearGradientBrush( myRect,Color::Blue,Color::Red,0.0f,true );

      // Draw an ellipse to the screen using the LinearGradientBrush.
      e->Graphics->FillEllipse( myLGBrush, myRect );

      // Create a bell-shaped brush with the peak at the
      // center of the drawing area.
      myLGBrush->SetSigmaBellShape( .5f, 1.0f );

      // Use the bell- shaped brush to draw a second
      // ellipse.
      myRect.Y = 150;
      e->Graphics->FillEllipse( myLGBrush, myRect );
   }
private void SetSigmaBellShapeExample(PaintEventArgs e)
{
             
    // Create a LinearGradientBrush.
    Rectangle myRect = new Rectangle(20, 20, 200, 100);
    LinearGradientBrush myLGBrush = new LinearGradientBrush(
        myRect, Color.Blue, Color.Red,  0.0f, true);
             
    // Draw an ellipse to the screen using the LinearGradientBrush.
    e.Graphics.FillEllipse(myLGBrush, myRect);
             
    // Create a bell-shaped brush with the peak at the
             
    // center of the drawing area.
    myLGBrush.SetSigmaBellShape(.5f, 1.0f);
             
    // Use the bell- shaped brush to draw a second
    // ellipse.
    myRect.Y = 150;
    e.Graphics.FillEllipse(myLGBrush, myRect);
}
Public Sub SetSigmaBellShapeExample(ByVal e As PaintEventArgs)

    ' Create a LinearGradientBrush.
    Dim myRect As New Rectangle(20, 20, 200, 100)
    Dim myLGBrush As New LinearGradientBrush(myRect, Color.Blue, _
    Color.Red, 0.0F, True)

    ' Draw an ellipse to the screen using the LinearGradientBrush.
    e.Graphics.FillEllipse(myLGBrush, myRect)

    ' Create a triangular shaped brush with the peak at the center
    ' of the drawing area.
    myLGBrush.SetSigmaBellShape(0.5F, 1.0F)

    ' Use the triangular brush to draw a second ellipse.
    myRect.Y = 150
    e.Graphics.FillEllipse(myLGBrush, myRect)
End Sub

설명

이 메서드는 focus그라데이션이 끝 색으로만 구성된 지점인 를 지정합니다. 매개 변수는 focus 그라데이션 선을 따라 거리의 비율로 위치를 나타냅니다. 그라데이션은 양쪽에 종 곡선 모양(일반 분포)에 따라 시작 색으로 떨어집니다.

적용 대상