QuadraticBezierSegment 类

定义

PathFigure 中的两个点之间创建二次贝塞尔曲线。

public ref class QuadraticBezierSegment sealed : PathSegment
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class QuadraticBezierSegment final : PathSegment
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class QuadraticBezierSegment final : PathSegment
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class QuadraticBezierSegment : PathSegment
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class QuadraticBezierSegment : PathSegment
Public NotInheritable Class QuadraticBezierSegment
Inherits PathSegment
<QuadraticBezierSegment .../>
继承
Object Platform::Object IInspectable DependencyObject PathSegment QuadraticBezierSegment
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

此示例创建一个 PathGeometry ,其中包含两个 PathFigure 对象,每个对象都包含多个 PathSegment 对象。

<Canvas>
    <Path Stroke="Black" StrokeThickness="4" >
        <Path.Data>
            <PathGeometry>
                <PathGeometry.Figures>
                    <PathFigure StartPoint="10,50">
                        <PathFigure.Segments>
                            <BezierSegment Point1="100,0"
            Point2="200,200"
            Point3="300,100"/>
                            <LineSegment Point="400,100" />
                            <ArcSegment Size="50,50" RotationAngle="45"
            IsLargeArc="True" SweepDirection="Clockwise"
            Point="200,100"/>
                        </PathFigure.Segments>
                    </PathFigure>

                    <PathFigure StartPoint="10,100">
                        <PathFigure.Segments>
                            <PolyLineSegment Points="50,100 50,150" />
                            <QuadraticBezierSegment Point1="200,200" Point2="300,100"/>
                        </PathFigure.Segments>
                    </PathFigure>
                </PathGeometry.Figures>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>

注解

此类与设置 Path 或 PathIcon 的矢量数据相关。

还可以将 QuadraticBezierSegment 定义为 Move 和 draw 命令语法的字符串中向量的一部分,而不是创建实例或对象元素。

构造函数

QuadraticBezierSegment()

初始化 QuadraticBezierSegment 类的新实例。

属性

Dispatcher

获取与此 对象关联的 CoreDispatcherCoreDispatcher 表示可以访问 UI 线程上的 DependencyObject 的工具,即使代码是由非 UI 线程启动的。

(继承自 DependencyObject)
Point1

获取或设置曲线的控制点。

Point1Property

标识 Point1 依赖属性。

Point2

获取或设置此 QuadraticBezierSegment的终结点

Point2Property

标识 Point2 依赖属性。

方法

ClearValue(DependencyProperty)

清除依赖属性的本地值。

(继承自 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

返回为依赖属性建立的任何基值,该基值适用于动画未处于活动状态的情况。

(继承自 DependencyObject)
GetValue(DependencyProperty)

DependencyObject 返回依赖属性的当前有效值。

(继承自 DependencyObject)
ReadLocalValue(DependencyProperty)

如果设置了本地值,则返回依赖属性的本地值。

(继承自 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

注册一个通知函数,用于侦听此 DependencyObject 实例上特定 DependencyProperty 的更改。

(继承自 DependencyObject)
SetValue(DependencyProperty, Object)

设置 DependencyObject 上依赖属性的本地值。

(继承自 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消以前通过调用 RegisterPropertyChangedCallback 注册的更改通知。

(继承自 DependencyObject)

适用于

另请参阅