Stroke.Clone Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a deep copy of the existing Stroke object.
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
Returns
The new Stroke object.
Examples
The following example demonstrates how to get a copy of the current Stroke object.
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
Remarks
The properties of an object that is a deep copy of another object have the same values as the properties of the original object.
Applies to
GitHub'da bizimle işbirliği yapın
Bu içeriğin kaynağı GitHub'da bulunabilir; burada ayrıca sorunları ve çekme isteklerini oluşturup gözden geçirebilirsiniz. Daha fazla bilgi için katkıda bulunan kılavuzumuzu inceleyin.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin