PolyQuadraticBezierSegment.Points 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 PointCollection 개체를 정의하는 PolyQuadraticBezierSegment을 가져오거나 설정합니다.
public:
property System::Windows::Media::PointCollection ^ Points { System::Windows::Media::PointCollection ^ get(); void set(System::Windows::Media::PointCollection ^ value); };
public System.Windows.Media.PointCollection Points { get; set; }
member this.Points : System.Windows.Media.PointCollection with get, set
Public Property Points As PointCollection
속성 값
이 PolyQuadraticBezierSegment 개체의 모양을 정의하는 컬렉션입니다. 기본값은 빈 컬렉션입니다.
예제
다음 예제에서는 사용 하는 방법을 보여 줍니다 PolyQuadraticBezierSegment 두 정방형 3 차원 곡선을 만들려고 합니다. 컨트롤 및 곡선의 끝점을 설정 하 여 지정 된 된 Points 속성입니다.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel>
<Canvas>
<Path Stroke="Black" StrokeThickness="1">
<Path.Data>
<PathGeometry>
<PathGeometry.Figures>
<PathFigureCollection>
<!-- The StartPoint specifies the starting point of the first curve. -->
<PathFigure StartPoint="10,100">
<PathFigure.Segments>
<PathSegmentCollection>
<!-- The PolyQuadraticBezierSegment specifies two Bezier curves.
The first curve is from 10,100 (start point specified above)
to 300,100 with a control point of 200,200. The second curve
is from 200,200 (end of the last curve) to 30,400 with a
control point of 0,200. -->
<PolyQuadraticBezierSegment Points="200,200 300,100 0,200 30,400" />
</PathSegmentCollection>
</PathFigure.Segments>
</PathFigure>
</PathFigureCollection>
</PathGeometry.Figures>
</PathGeometry>
</Path.Data>
</Path>
</Canvas>
</StackPanel>
</Page>
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace SDKSample
{
public partial class PolyQuadraticBezierSegmentExample : Page
{
public PolyQuadraticBezierSegmentExample()
{
// Create a PathFigure to be used for the PathGeometry of myPath.
PathFigure myPathFigure = new PathFigure();
// Set the starting point for the PathFigure specifying that the
// geometry starts at point 10,100.
myPathFigure.StartPoint = new Point(10, 100);
// Create a PointCollection that holds the Points used to specify
// the points of the PolyQuadraticBezierSegment below.
PointCollection myPointCollection = new PointCollection(4);
myPointCollection.Add(new Point(200, 200));
myPointCollection.Add(new Point(300, 100));
myPointCollection.Add(new Point(0, 200));
myPointCollection.Add(new Point(30, 400));
// The PolyQuadraticBezierSegment specifies two Bezier curves.
// The first curve is from 10,100 (start point specified above)
// to 300,100 with a control point of 200,200. The second curve
// is from 200,200 (end of the last curve) to 30,400 with a
// control point of 0,200.
PolyQuadraticBezierSegment myBezierSegment = new PolyQuadraticBezierSegment();
myBezierSegment.Points = myPointCollection;
PathSegmentCollection myPathSegmentCollection = new PathSegmentCollection();
myPathSegmentCollection.Add(myBezierSegment);
myPathFigure.Segments = myPathSegmentCollection;
PathFigureCollection myPathFigureCollection = new PathFigureCollection();
myPathFigureCollection.Add(myPathFigure);
PathGeometry myPathGeometry = new PathGeometry();
myPathGeometry.Figures = myPathFigureCollection;
// Create a path to draw a geometry with.
Path myPath = new Path();
myPath.Stroke = Brushes.Black;
myPath.StrokeThickness = 1;
// specify the shape (quadratic Bezier curve) of the path using the StreamGeometry.
myPath.Data = myPathGeometry;
// Add path shape to the UI.
StackPanel mainPanel = new StackPanel();
mainPanel.Children.Add(myPath);
this.Content = mainPanel;
}
}
}
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Media
Imports System.Windows.Shapes
Namespace SDKSample
Partial Public Class PolyQuadraticBezierSegmentExample
Inherits Page
Public Sub New()
' Create a PathFigure to be used for the PathGeometry of myPath.
Dim myPathFigure As New PathFigure()
' Set the starting point for the PathFigure specifying that the
' geometry starts at point 10,100.
myPathFigure.StartPoint = New Point(10, 100)
' Create a PointCollection that holds the Points used to specify
' the points of the PolyQuadraticBezierSegment below.
Dim myPointCollection As New PointCollection(4)
myPointCollection.Add(New Point(200, 200))
myPointCollection.Add(New Point(300, 100))
myPointCollection.Add(New Point(0, 200))
myPointCollection.Add(New Point(30, 400))
' The PolyQuadraticBezierSegment specifies two Bezier curves.
' The first curve is from 10,100 (start point specified above)
' to 300,100 with a control point of 200,200. The second curve
' is from 200,200 (end of the last curve) to 30,400 with a
' control point of 0,200.
Dim myBezierSegment As New PolyQuadraticBezierSegment()
myBezierSegment.Points = myPointCollection
Dim myPathSegmentCollection As New PathSegmentCollection()
myPathSegmentCollection.Add(myBezierSegment)
myPathFigure.Segments = myPathSegmentCollection
Dim myPathFigureCollection As New PathFigureCollection()
myPathFigureCollection.Add(myPathFigure)
Dim myPathGeometry As New PathGeometry()
myPathGeometry.Figures = myPathFigureCollection
' Create a path to draw a geometry with.
Dim myPath As New Path()
myPath.Stroke = Brushes.Black
myPath.StrokeThickness = 1
' specify the shape (quadratic Bezier curve) of the path using the StreamGeometry.
myPath.Data = myPathGeometry
' Add path shape to the UI.
Dim mainPanel As New StackPanel()
mainPanel.Children.Add(myPath)
Me.Content = mainPanel
End Sub
End Class
End Namespace
설명
컬렉션에서 처음 두 점 제어점과 첫 번째 곡선 세그먼트의 끝점을 지정합니다. 다음 두 가지 시점은 제어점과 끝점의 두 번째 곡선 세그먼트를 지정 및 등입니다. 컬렉션 요소의 수는 짝수를 포함 해야 합니다.
종속성 속성 정보
식별자 필드 | PointsProperty |
메타 데이터 속성 설정 true |
없음 |