TextureBrush.ScaleTransform 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 크기로 이 TextureBrush 개체의 로컬 기하학적 변환을 조정합니다. 이 메서드는 변환에 크기 조정 매트릭스를 추가합니다.
오버로드
ScaleTransform(Single, Single) |
지정된 크기로 이 TextureBrush 개체의 로컬 기하학적 변환을 조정합니다. 이 메서드는 변환에 크기 조정 매트릭스를 추가합니다. |
ScaleTransform(Single, Single, MatrixOrder) |
이 TextureBrush 개체의 로컬 기하학적 변형을 지정된 순서로 지정된 크기만큼 조정합니다. |
ScaleTransform(Single, Single)
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
지정된 크기로 이 TextureBrush 개체의 로컬 기하학적 변환을 조정합니다. 이 메서드는 변환에 크기 조정 매트릭스를 추가합니다.
public:
void ScaleTransform(float sx, float sy);
public void ScaleTransform (float sx, float sy);
member this.ScaleTransform : single * single -> unit
Public Sub ScaleTransform (sx As Single, sy As Single)
매개 변수
- sx
- Single
x 방향으로 변형을 조정할 크기입니다.
- sy
- Single
y 방향으로 변형을 조정할 크기입니다.
예제
다음 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint
매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
TextureBrush 개체를 만듭니다.
x 방향에서 텍스처 이미지의 크기를 두 번 조정합니다.
텍스처 브러시를 사용하여 화면에 사각형을 채웁니다.
void ScaleTransform_Example1( PaintEventArgs^ e )
{
// Create a TextureBrush object.
TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );
// Scale the texture image 2X in the x-direction.
tBrush->ScaleTransform( 2, 1 );
// Fill a rectangle with tBrush.
e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void ScaleTransform_Example1(PaintEventArgs e)
{
// Create a TextureBrush object.
TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
// Scale the texture image 2X in the x-direction.
tBrush.ScaleTransform(2, 1);
// Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub ScaleTransform_Example1(ByVal e As PaintEventArgs)
' Create a TextureBrush object.
Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))
' Scale the texture image 2X in the x-direction.
tBrush.ScaleTransform(2, 1)
' Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub
적용 대상
ScaleTransform(Single, Single, MatrixOrder)
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
- Source:
- TextureBrush.cs
이 TextureBrush 개체의 로컬 기하학적 변형을 지정된 순서로 지정된 크기만큼 조정합니다.
public:
void ScaleTransform(float sx, float sy, System::Drawing::Drawing2D::MatrixOrder order);
public void ScaleTransform (float sx, float sy, System.Drawing.Drawing2D.MatrixOrder order);
member this.ScaleTransform : single * single * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub ScaleTransform (sx As Single, sy As Single, order As MatrixOrder)
매개 변수
- sx
- Single
x 방향으로 변형을 조정할 크기입니다.
- sy
- Single
y 방향으로 변형을 조정할 크기입니다.
- order
- MatrixOrder
크기 조정 매트릭스를 앞에 추가할 것인지 아니면 뒤에 추가할 것인지를 지정하는 MatrixOrder 열거형입니다.
예제
다음 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint
매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
TextureBrush 개체를 만듭니다.
x 방향에서 텍스처 이미지의 크기를 두 번 조정합니다.
텍스처 브러시를 사용하여 화면에 사각형을 채웁니다.
void ScaleTransform_Example2( PaintEventArgs^ e )
{
// Create a TextureBrush object.
TextureBrush^ tBrush = gcnew TextureBrush( gcnew Bitmap( "texture.jpg" ) );
// Scale the texture image 2X in the x-direction.
tBrush->ScaleTransform( 2, 1, MatrixOrder::Prepend );
// Fill a rectangle with tBrush.
e->Graphics->FillRectangle( tBrush, 0, 0, 100, 100 );
}
public void ScaleTransform_Example2(PaintEventArgs e)
{
// Create a TextureBrush object.
TextureBrush tBrush = new TextureBrush(new Bitmap("texture.jpg"));
// Scale the texture image 2X in the x-direction.
tBrush.ScaleTransform(2, 1, MatrixOrder.Prepend);
// Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100);
}
Public Sub ScaleTransform_Example2(ByVal e As PaintEventArgs)
' Create a TextureBrush object.
Dim tBrush As New TextureBrush(New Bitmap("texture.jpg"))
' Scale the texture image 2X in the x-direction.
tBrush.ScaleTransform(2, 1, MatrixOrder.Prepend)
' Fill a rectangle with tBrush.
e.Graphics.FillRectangle(tBrush, 0, 0, 100, 100)
End Sub
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기