Pen.MultiplyTransform Método
Definición
Sobrecargas
MultiplyTransform(Matrix) |
Multiplica la matriz de transformación de este Pen por la Matrix especificada.Multiplies the transformation matrix for this Pen by the specified Matrix. |
MultiplyTransform(Matrix, MatrixOrder) |
Multiplica la matriz de transformación de este Pen por la Matrix especificada y en el orden especificado.Multiplies the transformation matrix for this Pen by the specified Matrix in the specified order. |
MultiplyTransform(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)
Parámetros
- matrix
- Matrix
El objeto Matrix por el que se va a multiplicar la matriz de transformación.The Matrix object by which to multiply the transformation matrix.
Ejemplos
El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e
, que es un parámetro del Paint controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse
, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:
Dibuja una línea en la pantalla.Draws a line to the screen.
Multiplica la matriz de transformación del lápiz por la matriz especificada.Multiplies the transformation matrix of the pen by the specified matrix.
Dibuja una línea con el lápiz transformado.Draws a line with the transformed pen.
public:
void MultiplyTransform_Example1( PaintEventArgs^ e )
{
// Create a Pen object.
Pen^ myPen = gcnew Pen( Color::Black,5.0f );
// Create a translation matrix.
Matrix^ penMatrix = gcnew Matrix;
penMatrix->Scale( 3, 1 );
// Multiply the transformation matrix of myPen by transMatrix.
myPen->MultiplyTransform( penMatrix );
// Draw a line to the screen.
e->Graphics->DrawLine( myPen, 0, 0, 100, 100 );
}
public void MultiplyTransform_Example1(PaintEventArgs e)
{
// Create a Pen object.
Pen myPen = new Pen(Color.Black, 5);
// Create a translation matrix.
Matrix penMatrix = new Matrix();
penMatrix.Scale(3, 1);
// Multiply the transformation matrix of myPen by transMatrix.
myPen.MultiplyTransform(penMatrix);
// Draw a line to the screen.
e.Graphics.DrawLine(myPen, 0, 0, 100, 100);
}
Public Sub MultiplyTransform_Example1(ByVal e As PaintEventArgs)
' Create a Pen object.
Dim myPen As New Pen(Color.Black, 5)
' Create a translation matrix.
Dim penMatrix As New Matrix
penMatrix.Scale(3, 1)
' Multiply the transformation matrix of myPen by transMatrix.
myPen.MultiplyTransform(penMatrix)
' Draw a line to the screen.
e.Graphics.DrawLine(myPen, 0, 0, 100, 100)
End Sub
Comentarios
Este método antepone la matriz de multiplicación especificada en el matrix
parámetro a la matriz de transformación para la operación de multiplicación.This method prepends the multiplication matrix specified in the matrix
parameter to the transformation matrix for the multiplication operation.
Se aplica a
MultiplyTransform(Matrix, MatrixOrder)
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)
Parámetros
- matrix
- Matrix
Matrix por la que se va a multiplicar la matriz de transformación.The Matrix by which to multiply the transformation matrix.
- order
- MatrixOrder
Orden en que se va a realizar la operación de multiplicación.The order in which to perform the multiplication operation.
Ejemplos
El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e
, que es un parámetro del Paint controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse
, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:
Dibuja una línea en la pantalla.Draws a line to the screen.
Multiplica la matriz de transformación del lápiz por la matriz especificada.Multiplies the transformation matrix of the pen by the specified matrix.
Dibuja una línea con el lápiz transformado.Draws a line with the transformed pen.
public:
void MultiplyTransform_Example2( PaintEventArgs^ e )
{
// Create a Pen object.
Pen^ myPen = gcnew Pen( Color::Black,5.0f );
// Create a translation matrix.
Matrix^ penMatrix = gcnew Matrix;
penMatrix->Scale( 3, 1 );
// Multiply the transformation matrix of myPen by transMatrix.
myPen->MultiplyTransform( penMatrix, MatrixOrder::Prepend );
// Draw a line to the screen.
e->Graphics->DrawLine( myPen, 0, 0, 100, 100 );
}
public void MultiplyTransform_Example2(PaintEventArgs e)
{
// Create a Pen object.
Pen myPen = new Pen(Color.Black, 5);
// Create a translation matrix.
Matrix penMatrix = new Matrix();
penMatrix.Scale(3, 1);
// Multiply the transformation matrix of myPen by transMatrix.
myPen.MultiplyTransform(penMatrix, MatrixOrder.Prepend);
// Draw a line to the screen.
e.Graphics.DrawLine(myPen, 0, 0, 100, 100);
}
Public Sub MultiplyTransform_Example2(ByVal e As PaintEventArgs)
' Create a Pen object.
Dim myPen As New Pen(Color.Black, 5)
' Create a translation matrix.
Dim penMatrix As New Matrix
penMatrix.Scale(3, 1)
' Multiply the transformation matrix of myPen by transMatrix.
myPen.MultiplyTransform(penMatrix, MatrixOrder.Prepend)
' Draw a line to the screen.
e.Graphics.DrawLine(myPen, 0, 0, 100, 100)
End Sub
Comentarios
Este método usa el MatrixOrder elemento de enumeración (anteponer o anexar) especificado por el order
parámetro para llevar a cabo la operación de multiplicación.This method uses the MatrixOrder enumeration element (either prepend or append) specified by the order
parameter to carry out the multiplication operation.