PdfBezierSegment Class

Cubic Bezier curve segment.

Inheritance Hierarchy

System.Object
  BitMiracle.Docotic.Pdf.PdfPathSegment
    BitMiracle.Docotic.Pdf.PdfBezierSegment

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public sealed class PdfBezierSegment : PdfPathSegment
VB
Public NotInheritable Class PdfBezierSegment
	Inherits PdfPathSegment

The PdfBezierSegment type exposes the following members.

Properties

  NameDescription
Public propertyEnd
Gets the end point of this PdfBezierSegment.
Public propertyFirstControl
Gets the first control point of this PdfBezierSegment.
Public propertySecondControl
Gets the second control point of this PdfBezierSegment.
Public propertyStart
Gets the start point of this PdfBezierSegment.
Public propertyType
Gets the type of this PdfPathSegment.
(Inherited from PdfPathSegment.)

Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)

Remarks

Such curves are defined by four points: the two endpoints (the start point P0 and the final point P3 ) and two control points P1 and P2. Given the coordinates of the four points, the curve is generated by varying the parameter t from 0.0 to 1.0 in the following equation:

R(t) = P0 * (1 – t) ^ 3 + P1 * 3 * t * (1 – t) ^ 2 + P2 * 3 * (1 – t) * t ^ 2 + P3 * t ^ 3

When t = 0.0, the value of the function R(t) coincides with the current point P0; when t = 1.0, R (t)coincides with the final point P3. Intermediate values of t generate intermediate points along the curve. The curve does not, in general, pass through the two control points P1 and P2.

Cubic Bézier curves have two useful properties:

  • The curve can be very quickly split into smaller pieces for rapid rendering.
  • The curve is contained within the convex hull of the four points defining the curve, most easily visualized as the polygon obtained by stretching a rubber band around the outside of the four points. This property allows rapid testing of whether the curve lies completely outside the visible region, and hence does not have to be rendered.

See Also