다음을 통해 공유


LinearGradientBrush.MultiplyTransform 메서드

정의

지정된 Matrix앞에 추가하여 이 LinearGradientBrush 로컬 기하학적 변환을 나타내는 Matrix 지정된 Matrix 곱합니다.

오버로드

MultiplyTransform(Matrix, MatrixOrder)

LinearGradientBrush 로컬 기하학적 변환을 나타내는 Matrix 지정된 순서의 지정된 Matrix 곱합니다.

MultiplyTransform(Matrix)

지정된 Matrix앞에 추가하여 이 LinearGradientBrush 로컬 기하학적 변환을 나타내는 Matrix 지정된 Matrix 곱합니다.

MultiplyTransform(Matrix, MatrixOrder)

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

LinearGradientBrush 로컬 기하학적 변환을 나타내는 Matrix 지정된 순서의 지정된 Matrix 곱합니다.

public:
 void MultiplyTransform(System::Drawing::Drawing2D::Matrix ^ matrix, System::Drawing::Drawing2D::MatrixOrder order);
public void MultiplyTransform (System.Drawing.Drawing2D.Matrix matrix, System.Drawing.Drawing2D.MatrixOrder order);
member this.MultiplyTransform : System.Drawing.Drawing2D.Matrix * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub MultiplyTransform (matrix As Matrix, order As MatrixOrder)

매개 변수

matrix
Matrix

기하학적 변환을 곱할 Matrix.

order
MatrixOrder

두 행렬을 곱할 순서를 지정하는 MatrixOrder.

예제

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

  • LinearGradientBrush만듭니다.

  • 이 브러시를 사용하여 화면에 줄임표를 그립니다.

  • MultiplyTransform 메서드를 호출하여 LinearGradientBrush변환합니다.

  • 변형된 브러시를 사용하여 첫 번째 줄임표 바로 아래의 화면에 줄임표를 그립니다.

아래쪽 줄임표는 가로 방향으로 늘어나고 그라데이션은 새 셰이프와 일치하도록 늘입니다.

private:
   void MultiplyTransformExample( 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 );

      // Transform the LinearGradientBrush.
      array<Point>^ transformArray = {Point(20,150),Point(400,150),Point(20,200)};
      Matrix^ myMatrix = gcnew Matrix( myRect,transformArray );
      myLGBrush->MultiplyTransform( myMatrix, MatrixOrder::Prepend );

      // Draw a second ellipse to the screen using
      // the transformed brush.
      e->Graphics->FillEllipse( myLGBrush, 20, 150, 380, 50 );
   }
 private void MultiplyTransformExample(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);
              
     // Transform the LinearGradientBrush.
     Point[] transformArray = { new Point(20, 150),
          new Point(400,150), new Point(20, 200) };

     Matrix myMatrix = new Matrix(myRect, transformArray);
     myLGBrush.MultiplyTransform(
         myMatrix,
         MatrixOrder.Prepend);
              
     // Draw a second ellipse to the screen using
     // the transformed brush.
     e.Graphics.FillEllipse(myLGBrush, 20, 150, 380, 50);
 }
Public Sub MultiplyTransformExample(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)

    ' Transform the LinearGradientBrush.
    Dim transformArray As Point() = {New Point(20, 150), _
    New Point(400, 150), New Point(20, 200)}
    Dim myMatrix As New Matrix(myRect, transformArray)
    myLGBrush.MultiplyTransform(myMatrix, MatrixOrder.Prepend)

    ' Draw a second ellipse to the screen using the transformed brush.
    e.Graphics.FillEllipse(myLGBrush, 20, 150, 380, 50)
End Sub

적용 대상

MultiplyTransform(Matrix)

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

지정된 Matrix앞에 추가하여 이 LinearGradientBrush 로컬 기하학적 변환을 나타내는 Matrix 지정된 Matrix 곱합니다.

public:
 void MultiplyTransform(System::Drawing::Drawing2D::Matrix ^ matrix);
public void MultiplyTransform (System.Drawing.Drawing2D.Matrix matrix);
member this.MultiplyTransform : System.Drawing.Drawing2D.Matrix -> unit
Public Sub MultiplyTransform (matrix As Matrix)

매개 변수

matrix
Matrix

기하학적 변환을 곱할 Matrix.

예제

예제는 MultiplyTransform참조하세요.

적용 대상