Cubic Bezier curve segment.

Inheritance Hierarchy


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


public sealed class PdfBezierSegment : PdfPathSegment
Public NotInheritable Class PdfBezierSegment
	Inherits PdfPathSegment

The PdfBezierSegment type exposes the following members.


Public propertyEnd
End point of this PdfBezierSegment.
Public propertyFirstControl
First control point of this PdfBezierSegment.
Public propertySecondControl
Second control point of this PdfBezierSegment.
Public propertyStart
Start point of this PdfBezierSegment.
Public propertyType
Gets the type of this PdfPathSegment.
(Inherited from PdfPathSegment.)


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


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 Bezier 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