BezierGraphicsPathSegment Class
A cubic Bézier curve segment in a graphics path.
Declaration
public class BezierGraphicsPathSegment extends GraphicsPathSegment
Remarks
Use the GraphicsPath.appendBezierSegment() method to append a cubic Bezier curve segment to the path.
The following code snippet creates a Bézier curve and adds it to the page:
GraphicsPath bezier = new GraphicsPath(new PointF(210, 375));
bezier.appendBezierSegment(
new PointF(210, 320),
new PointF(350, 320),
new PointF(350, 375));
bezier.appendBezierSegment(
new PointF(350, 430),
new PointF(210, 430),
new PointF(210, 375));
PathFragment bezierFragment = new PathFragment();
bezierFragment.getPaths().add(bezier);
bezierFragment.setAction(PathShapeAction.FILL_AND_STROKE);
bezierFragment.setFill(Fill.createSolid(PdfColor.getOrange()));
bezierFragment.setOutline(Outline.create(Fill.createSolid(PdfColor.getDarkOrange())));
page.addFragment(bezierFragment);
Refer to the following help topic for additional information: Add Shapes to PDF Documents.
Inherited Members
Inheritance
Constructors
BezierGraphicsPathSegment(float firstControlPointX, float firstControlPointY, float secondControlPointX, float secondControlPointY, float endPointX, float endPointY) Constructor
Initializes a new instance of the BezierGraphicsPathSegment class with specified settings.
Declaration
public BezierGraphicsPathSegment(float firstControlPointX, float firstControlPointY, float secondControlPointX, float secondControlPointY, float endPointX, float endPointY)
Parameters
| Name | Type | Description |
|---|---|---|
| firstControlPointX | float | The X-coordinate of the first control point of the Bezier curve. |
| firstControlPointY | float | The Y-coordinate of the first control point of the Bezier curve. |
| secondControlPointX | float | The X-coordinate of the second control point of the Bezier curve. |
| secondControlPointY | float | The Y-coordinate of the second control point of the Bezier curve. |
| endPointX | float | The X-coordinate of the end point of the Bezier curve. |
| endPointY | float | The Y-coordinate of the end point of the Bezier curve. |
BezierGraphicsPathSegment(PointF firstControlPoint, PointF secondControlPoint, PointF endPoint) Constructor
Initializes a new instance of the BezierGraphicsPathSegment class with specified control points of the Bezier curve.
Declaration
public BezierGraphicsPathSegment(PointF firstControlPoint, PointF secondControlPoint, PointF endPoint)
Parameters
| Name | Type | Description |
|---|---|---|
| firstControlPoint | com.devexpress.system.drawing.PointF | The first control point of the Bezier curve. |
| secondControlPoint | com.devexpress.system.drawing.PointF | The second control point of the Bezier curve. |
| endPoint | com.devexpress.system.drawing.PointF | The end point of the Bezier curve. |
Methods
getFirstControlPoint() Method
Returns the first control point of the Bezier curve.
Declaration
public PointF getFirstControlPoint()
Returns
| Type | Description |
|---|---|
| com.devexpress.system.drawing.PointF | The first control point of the Bezier curve. |
getSecondControlPoint() Method
Returns the second control point of the Bezier curve.
Declaration
public PointF getSecondControlPoint()
Returns
| Type | Description |
|---|---|
| com.devexpress.system.drawing.PointF | The second control point of the Bezier curve. |