LinearGradientBrush.SetBlendTriangularShape 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
가운데에 특정 색이 있으며, 양쪽 끝에서 단일 색으로 선형 대칭을 이루는 선형 그라데이션을 만듭니다.
오버로드
SetBlendTriangularShape(Single) |
가운데에 특정 색이 있으며, 양쪽 끝에서 단일 색으로 선형 대칭을 이루는 선형 그라데이션을 만듭니다. |
SetBlendTriangularShape(Single, Single) |
가운데에 특정 색이 있으며, 양쪽 끝에서 단일 색으로 선형 대칭을 이루는 선형 그라데이션을 만듭니다. |
SetBlendTriangularShape(Single)
- Source:
- LinearGradientBrush.cs
- Source:
- LinearGradientBrush.cs
- Source:
- LinearGradientBrush.cs
가운데에 특정 색이 있으며, 양쪽 끝에서 단일 색으로 선형 대칭을 이루는 선형 그라데이션을 만듭니다.
public:
void SetBlendTriangularShape(float focus);
public void SetBlendTriangularShape (float focus);
member this.SetBlendTriangularShape : single -> unit
Public Sub SetBlendTriangularShape (focus As Single)
매개 변수
- focus
- Single
그라데이션이 끝 색으로만 구성된 지점인 그라데이션 가운데를 지정하는 0에서 100 사이의 값입니다.
예제
예제를 보려면 SetBlendTriangularShape를 참조하세요.
설명
이 메서드는 focus
그라데이션이 끝 색으로만 구성된 지점인 를 지정합니다. 매개 변수는 focus
그라데이션 선을 따라 거리의 비율로 위치를 나타냅니다. 그라데이션은 양쪽에 선형으로 시작 색으로 떨어집니다.
적용 대상
SetBlendTriangularShape(Single, Single)
- Source:
- LinearGradientBrush.cs
- Source:
- LinearGradientBrush.cs
- Source:
- LinearGradientBrush.cs
가운데에 특정 색이 있으며, 양쪽 끝에서 단일 색으로 선형 대칭을 이루는 선형 그라데이션을 만듭니다.
public:
void SetBlendTriangularShape(float focus, float scale);
public void SetBlendTriangularShape (float focus, float scale);
member this.SetBlendTriangularShape : single * single -> unit
Public Sub SetBlendTriangularShape (focus As Single, scale As Single)
매개 변수
- focus
- Single
그라데이션이 끝 색으로만 구성된 지점인 그라데이션 가운데를 지정하는 0에서 100 사이의 값입니다.
- scale
- Single
시작 색에서 focus
(끝 색)까지 색이 대칭을 이루는 속도를 지정하는 0에서 1 사이의 값입니다.
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 개체인 이 OnPaint 필요합니다PaintEventArgse
. 코드는 다음 작업을 수행합니다.
새 LinearGradientBrush를 만듭니다.
이 브러시를 사용하여 선형의 왼쪽에서 오른쪽으로 색이 전환된 화면에 타원을 그립니다.
LinearGradientBrush 를 가운데에 피크가 있는 삼각형 모양으로 변환합니다.
변환된 브러시를 사용하여 화면에 두 번째 타원을 그립니다.
아래쪽 타원의 그라데이션이 파란색에서 빨간색으로 전환된 다음 다시 파란색으로 전환됩니다.
private:
void SetBlendTriangularShapeExample( 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 triangular shaped brush with the peak at the center
// of the drawing area.
myLGBrush->SetBlendTriangularShape( .5f, 1.0f );
// Use the triangular brush to draw a second ellipse.
myRect.Y = 150;
e->Graphics->FillEllipse( myLGBrush, myRect );
}
private void SetBlendTriangularShapeExample(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 triangular shaped brush with the peak at the center
// of the drawing area.
myLGBrush.SetBlendTriangularShape(.5f, 1.0f);
// Use the triangular brush to draw a second ellipse.
myRect.Y = 150;
e.Graphics.FillEllipse(myLGBrush, myRect);
}
Public Sub SetBlendTriangularShapeExample(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.SetBlendTriangularShape(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
그라데이션 선을 따라 거리의 비율로 위치를 나타냅니다. 그라데이션은 양쪽에 선형으로 시작 색으로 떨어집니다.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기