Dil

TextureBrush.ScaleTransform Yöntem

Tanım

Bu TextureBrush nesnenin yerel geometrik dönüşümlerini belirtilen miktarlara göre ölçeklendirir. Bu yöntem ölçeklendirme matrisini dönüştürmeye ekler.

Aşırı Yüklemeler

Name Description
ScaleTransform(Single, Single)

Bu TextureBrush nesnenin yerel geometrik dönüşümlerini belirtilen miktarlara göre ölçeklendirir. Bu yöntem ölçeklendirme matrisini dönüştürmeye ekler.

ScaleTransform(Single, Single, MatrixOrder)

Bu TextureBrush nesnenin yerel geometrik dönüştürmesini belirtilen sırada belirtilen tutarlara göre ölçeklendirir.

ScaleTransform(Single, Single)

Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs

Bu TextureBrush nesnenin yerel geometrik dönüşümlerini belirtilen miktarlara göre ölçeklendirir. Bu yöntem ölçeklendirme matrisini dönüştürmeye ekler.

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)

Parametreler

sx
Single

Dönüştürmenin x yönünde ölçeklendirildiği tutar.

sy
Single

Dönüşümün y yönünde ölçeklendirildiği miktar.

Örnekler

Aşağıdaki örnek, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin PaintEventArgs parametresi olan öğesini gerektirir.ePaint Kod aşağıdaki eylemleri gerçekleştirir:

  • Bir TextureBrush nesnesi oluşturur.

  • Doku görüntüsünü x yönünde iki kez ölçeklendirir.

  • Doku fırçasını kullanarak ekrandaki bir dikdörtgeni doldurur.

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

Şunlara uygulanır

ScaleTransform(Single, Single, MatrixOrder)

Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs
Kaynak:
TextureBrush.cs

Bu TextureBrush nesnenin yerel geometrik dönüştürmesini belirtilen sırada belirtilen tutarlara göre ölçeklendirir.

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)

Parametreler

sx
Single

Dönüştürmenin x yönünde ölçeklendirildiği tutar.

sy
Single

Dönüşümün y yönünde ölçeklendirildiği miktar.

order
MatrixOrder

MatrixOrder Ölçeklendirme matrisinin eklenip eklenmeyeceğini veya eklenip eklenmeyeceğini belirten bir numaralandırma.

Örnekler

Aşağıdaki örnek, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin PaintEventArgs parametresi olan öğesini gerektirir.ePaint Kod aşağıdaki eylemleri gerçekleştirir:

  • Bir TextureBrush nesnesi oluşturur.

  • Doku görüntüsünü x yönünde iki kez ölçeklendirir.

  • Doku fırçasını kullanarak ekrandaki bir dikdörtgeni doldurur.

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

Şunlara uygulanır