Udostępnij za pośrednictwem


PolyQuadraticBezierSegment

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents a set of quadratic Bezier segments.

<PolyQuadraticBezierSegment   .../>

Managed Equivalent

PolyQuadraticBezierSegment

Remarks

A QuadraticBezierSegment object can have one control point and an end point. A PolyQuadraticBezierSegment object can have an essentially unlimited number of control points, with the values of these points and the end point given as the Points property value. Individual points are parsed out of the Points string.

Example

The following example creates two curves by using a PolyQuadraticBezierSegment to specify the coordinates.

<Canvas
  xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
  Width="500" Height="100">
      <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>

The following illustration shows how the preceding code renders.

PolyQuadraticBezierCurve example

PolyQuadraticBezierSegment

See Also

Reference