iText 8.0.2 API
iText.Kernel.Geom.BezierCurve Class Reference

Represents a Bezier curve. More...

Inheritance diagram for iText.Kernel.Geom.BezierCurve:

## Public Member Functions

BezierCurve (IList< Point > controlPoints)
Constructs new bezier curve. More...

virtual IList< Point GetBasePoints ()
Treat base points as the points which are enough to construct a shape. More...

virtual IList< Point GetPiecewiseLinearApproximation ()
You can adjust precision of the approximation by varying the following parameters: curveCollinearityEpsilon , distanceToleranceSquare , distanceToleranceManhattan. More...

## Static Public Attributes

static double  curveCollinearityEpsilon = 1.0e-30
If the distance between a point and a line is less than this constant, then we consider the point lies on the line. More...

static double  distanceToleranceSquare = 0.025D
In the case when neither the line ((x1, y1), (x4, y4)) passes through both (x2, y2) and (x3, y3) nor (x1, y1) = (x4, y4) we use the square of the sum of the distances mentioned below in compare to this field as the criterion of good approximation. More...

static double  distanceToleranceManhattan = 0.4D
The Manhattan distance is used in the case when either the line ((x1, y1), (x4, y4)) passes through both (x2, y2) and (x3, y3) or (x1, y1) = (x4, y4). More...

## Detailed Description

Represents a Bezier curve.

## ◆ BezierCurve()

 iText.Kernel.Geom.BezierCurve.BezierCurve ( IList< Point > controlPoints )
inline

Constructs new bezier curve.

Parameters
 controlPoints Curve's control points.

## ◆ GetBasePoints()

 virtual IList iText.Kernel.Geom.BezierCurve.GetBasePoints ( )
inlinevirtual

Treat base points as the points which are enough to construct a shape.

Implements iText.Kernel.Geom.IShape.

## ◆ GetPiecewiseLinearApproximation()

 virtual IList iText.Kernel.Geom.BezierCurve.GetPiecewiseLinearApproximation ( )
inlinevirtual

You can adjust precision of the approximation by varying the following parameters: curveCollinearityEpsilon , distanceToleranceSquare , distanceToleranceManhattan.

Returns

System.Collections.IList containing points of piecewise linear approximation for this bezier curve.

## ◆ curveCollinearityEpsilon

 double iText.Kernel.Geom.BezierCurve.curveCollinearityEpsilon = 1.0e-30
static

If the distance between a point and a line is less than this constant, then we consider the point lies on the line.

## ◆ distanceToleranceManhattan

 double iText.Kernel.Geom.BezierCurve.distanceToleranceManhattan = 0.4D
static

The Manhattan distance is used in the case when either the line ((x1, y1), (x4, y4)) passes through both (x2, y2) and (x3, y3) or (x1, y1) = (x4, y4).

The Manhattan distance is used in the case when either the line ((x1, y1), (x4, y4)) passes through both (x2, y2) and (x3, y3) or (x1, y1) = (x4, y4). The essential observation is that when the curve is a uniform speed straight line from end to end, the control points are evenly spaced from beginning to end. Our measure of how far we deviate from that ideal uses distance of the middle controls: point 2 should be halfway between points 1 and 3; point 3 should be halfway between points 2 and 4.

## ◆ distanceToleranceSquare

 double iText.Kernel.Geom.BezierCurve.distanceToleranceSquare = 0.025D
static

In the case when neither the line ((x1, y1), (x4, y4)) passes through both (x2, y2) and (x3, y3) nor (x1, y1) = (x4, y4) we use the square of the sum of the distances mentioned below in compare to this field as the criterion of good approximation.

In the case when neither the line ((x1, y1), (x4, y4)) passes through both (x2, y2) and (x3, y3) nor (x1, y1) = (x4, y4) we use the square of the sum of the distances mentioned below in compare to this field as the criterion of good approximation.

1. The distance between the line and (x2, y2)
2. The distance between the line and (x3, y3)