StrokeCollection.Transform(Matrix, Boolean) Yöntem

Tanım

içindeki her StylusPoints bir vuruş StylusTipTransform için ve isteğe bağlı olarak StrokeCollection öğesini belirtilen Matrixdeğerine göre değiştirir.

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)

Parametreler

transformMatrix
Matrix

Matrix üzerinde StrokeCollectiongerçekleştirilecek dönüşümü belirten bir.

applyToStylusTip
Boolean

true dönüşümü ekran kaleminin ucuna uygulamak için; aksi takdirde , false.

Örnekler

Aşağıdaki örnekte, üzerindeki InkCanvastüm vuruşların nasıl taşınacakları gösterilmektedir. Bu örnekte adlı InkCanvasbir inkCanvas1 olduğu varsayılır.

// 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

Açıklamalar

olduğunda applyToStylusTiptrueTransform, yöntem ekran kalemi ucunun şeklini ve vuruşların konumunu etkiler. Örneğin, 90 derece döndürürseniz StrokeCollection , vuruşlar bir eksen etrafında hareket eder ve vuruşların yüksekliği ve genişliği ters çevrilmiş gibi görünür.

Şunlara uygulanır