Stroke.StylusPoints 속성

정의

Stroke의 스타일러스 지점을 반환합니다.

public:
 property System::Windows::Input::StylusPointCollection ^ StylusPoints { System::Windows::Input::StylusPointCollection ^ get(); void set(System::Windows::Input::StylusPointCollection ^ value); };
public System.Windows.Input.StylusPointCollection StylusPoints { get; set; }
member this.StylusPoints : System.Windows.Input.StylusPointCollection with get, set
Public Property StylusPoints As StylusPointCollection

속성 값

StylusPointCollection

현재 StylusPointCollection를 나타내는 스타일러스 포인트가 들어 있는 Stroke입니다.

예제

다음 예제에서는 재정의 된의 일부인 Stroke 각각에 원을 그리는 StylusPoint합니다. 경우는 FitToCurve 속성이 trueGetBezierStylusPoints 스타일러스 포인트를 가져오는 데 사용 됩니다. 그렇지 않은 경우는 StylusPoints 속성을 사용 합니다.

protected override void DrawCore(DrawingContext context, DrawingAttributes overrides)
{
    // Draw the stroke. Calling base.DrawCore accomplishes the same thing.
    Geometry geometry = GetGeometry(overrides);
    context.DrawGeometry(new SolidColorBrush(overrides.Color), null, geometry);

    StylusPointCollection points;

    // Get the stylus points used to draw the stroke.  The points used depends on
    // the value of FitToCurve.
    if (this.DrawingAttributes.FitToCurve)
    {
        points = this.GetBezierStylusPoints();
    }
    else
    {
        points = this.StylusPoints;
    }

    // Draw a circle at each stylus point.
    foreach (StylusPoint p in points)
    {
        context.DrawEllipse(null, new Pen(Brushes.Black, 1), (Point)p, 5, 5);
    }
}
Protected Overrides Sub DrawCore(ByVal context As DrawingContext, _
        ByVal overridedAttributes As DrawingAttributes)

    ' Draw the stroke. Calling base.DrawCore accomplishes the same thing.
    Dim geometry As Geometry = GetGeometry(overridedAttributes)
    context.DrawGeometry(New SolidColorBrush(overridedAttributes.Color), Nothing, geometry)

    Dim points As StylusPointCollection

    ' Get the stylus points used to draw the stroke.  The points used depends on
    ' the value of FitToCurve.
    If Me.DrawingAttributes.FitToCurve Then
        points = Me.GetBezierStylusPoints()
    Else
        points = Me.StylusPoints
    End If

    ' Draw a circle at each stylus point.
    Dim p As StylusPoint
    For Each p In points
        context.DrawEllipse(Nothing, New Pen(Brushes.Black, 1), CType(p, Point), 5, 5)
    Next p

End Sub

설명

되는 스타일러스 지점을 가져올 때 사용 되는 FitToCurve 속성에는 DrawingAttributes 속성이로 설정 된 true, 사용를 GetBezierStylusPoints 메서드.

참고

StylusPointCollection 에 할당 합니다 StylusPoints 속성이 하나 이상 있어야 StylusPoint 에 합니다. 빈 할당 하려고 하면 StylusPointCollectionStylusPoints를 모두 제거 하거나를 StylusPoint 에서 개체 StylusPoints, 예외가 발생 합니다.

적용 대상