Stroke.Clone 메서드

정의

기존 Stroke 개체의 전체 복사본을 반환합니다.

public:
 virtual System::Windows::Ink::Stroke ^ Clone();
public virtual System.Windows.Ink.Stroke Clone ();
abstract member Clone : unit -> System.Windows.Ink.Stroke
override this.Clone : unit -> System.Windows.Ink.Stroke
Public Overridable Function Clone () As Stroke

반환

Stroke

새로운 Stroke 개체입니다.

예제

다음 예에서는 현재 복사본을 가져오는 방법을 보여 줍니다. Stroke 개체입니다.



Stroke GetLittleRedStroke(Stroke theStroke)
{
    // Copy the incoming stroke
    Stroke sCopy = theStroke.Clone();

    // Scale it by 50%
    Matrix xform = new Matrix();
    xform.Scale(0.5, 0.5);

    sCopy.Transform(xform, false);

    // Color it red
    sCopy.DrawingAttributes.Color = Colors.Red;

    // Return the new stroke
    return (sCopy);
}

Function GetLittleRedStroke(ByVal theStroke As Stroke) As Stroke
    ' Copy the incoming stroke
    Dim sCopy As Stroke = theStroke.Clone()

    ' Scale it by 50%
    Dim xform As New Matrix()
    xform.Scale(0.5, 0.5)

    sCopy.Transform(xform, False)

    ' Color it red
    sCopy.DrawingAttributes.Color = Colors.Red

    ' Return the new stroke
    Return sCopy

End Function 'getLittleRedStroke

설명

다른 개체의 전체 복사본 인 개체의 속성을 원래 개체의 속성과 동일한 값을 갖습니다.

적용 대상