Skip to main content

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

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
GraphicsPathSegment
BezierGraphicsPathSegment

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.