다음을 통해 공유


LinearGradientBrush.MultiplyTransform 메서드

정의

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

오버로드

MultiplyTransform(Matrix, MatrixOrder)

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

MultiplyTransform(Matrix)

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

MultiplyTransform(Matrix, MatrixOrder)

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

지정된 순서에 따라 지정된 Matrix를 이 LinearGradientBrush의 로컬 기하학적 변환을 나타내는 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

지정된 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를 참조하세요.

적용 대상