LinearGradientBrush.MultiplyTransform メソッド

定義

このMatrixのローカル ジオメトリック変換を表すLinearGradientBrushを、指定したMatrixの前に指定したMatrixで乗算します。

オーバーロード

名前 説明
MultiplyTransform(Matrix, MatrixOrder)

このMatrixのローカル ジオメトリック変換を表すLinearGradientBrushに、指定したMatrixを指定した順序で乗算します。

MultiplyTransform(Matrix)

このMatrixのローカル ジオメトリック変換を表すLinearGradientBrushを、指定したMatrixの前に指定したMatrixで乗算します。

MultiplyTransform(Matrix, MatrixOrder)

ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
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

2 つの行列を乗算する順序を指定する MatrixOrder

次のコード例は、Windows フォームで使用できるように設計されており、PaintEventArgs イベント オブジェクトである eOnPaint が必要です。 コードは次のアクションを実行します。

  • 新しい 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)

ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
LinearGradientBrush.cs
ソース:
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を参照してください。

適用対象