Cubic Bezier curve segment.

C#

public sealed class PdfBezierSegment : PdfPathSegment

VB

Public NotInheritable Class PdfBezierSegment Inherits PdfPathSegment

The PdfBezierSegment type exposes the following members.

Name | Description | |
---|---|---|

End |
Gets the end point of this PdfBezierSegment.
| |

FirstControl |
Gets the first control point of this PdfBezierSegment.
| |

SecondControl |
Gets the second control point of this PdfBezierSegment.
| |

Start |
Gets the start point of this PdfBezierSegment.
| |

Type |
Gets the type of this PdfPathSegment.
(Inherited from PdfPathSegment.) |

Name | Description | |
---|---|---|

Equals | (Inherited from Object.) | |

GetHashCode | (Inherited from Object.) | |

GetType | (Inherited from Object.) | |

ToString | (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 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.