StrokeCollection.Transform(Matrix, Boolean) Methode

Definition

Ändert jeden und StylusPoints optional für StylusTipTransform jeden Strich in der StrokeCollection angegebenen Matrix.

public:
 void Transform(System::Windows::Media::Matrix transformMatrix, bool applyToStylusTip);
public void Transform(System.Windows.Media.Matrix transformMatrix, bool applyToStylusTip);
member this.Transform : System.Windows.Media.Matrix * bool -> unit
Public Sub Transform (transformMatrix As Matrix, applyToStylusTip As Boolean)

Parameter

transformMatrix
Matrix

Ein Matrix Wert, der die für die StrokeCollectionAusführung auszuführende Transformation angibt.

applyToStylusTip
Boolean

truedie Transformation auf die Spitze des Eingabestifts anzuwenden; andernfalls . false

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie alle Striche in einem InkCanvasStrich verschoben werden. In diesem Beispiel wird davon ausgegangen, dass ein aufgerufener InkCanvas Vorgang vorhanden inkCanvas1ist.

// Move all the strokes on the InkCanvas to the right.
private void MoveStrokes_Click(object sender, RoutedEventArgs e)
{
    Matrix moveMatrix = new Matrix(1, 0, 0, 1, 20, 0);

    inkCanvas1.Strokes.Transform(moveMatrix, false);
}
' Move all the strokes on the InkCanvas to the right.
Private Sub MoveStrokes_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)

    Dim moveMatrix As New Matrix(1, 0, 0, 1, 20, 0)

    inkCanvas1.Strokes.Transform(moveMatrix, False)

End Sub

Hinweise

Wenn applyToStylusTip ja true, wirkt sich die Transform Methode auf die Form der Eingabestiftspitze sowie auf die Position der Striche aus. Wenn Sie z. B. einen StrokeCollection 90 Grad drehen, bewegen sich die Striche um eine Achse, und die Höhe und Breite der Striche scheinen umgekehrt zu sein.

Gilt für: