Skip to main content

DXGraphicsPath Class

A graphics path.

Declaration

public class DXGraphicsPath extends JavaObject implements IDisposable

Implements

com.devexpress.system.IDisposable

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
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
com.devexpress.system.JavaObject
DXGraphicsPath

Constructors

DXGraphicsPath() Constructor

Initializes a new instance of the DXGraphicsPath class.

Declaration

public DXGraphicsPath()

DXGraphicsPath(DXFillMode fillMode) Constructor

Initializes a new instance of the DXGraphicsPath class with specified settings.

Declaration

public DXGraphicsPath(DXFillMode fillMode)

Parameters

Name Type Description
fillMode DXFillMode

The fill mode.

DXGraphicsPath(DXGraphicsPathData pathData) Constructor

Initializes a new instance of the DXGraphicsPath class with specified settings.

Declaration

public DXGraphicsPath(DXGraphicsPathData pathData)

Parameters

Name Type Description
pathData DXGraphicsPathData

The path data.

DXGraphicsPath(List<PointF> points, List<DXPathPointType> types, DXFillMode fillMode) Constructor

Initializes a new instance of the DXGraphicsPath class with specified settings.

Declaration

public DXGraphicsPath(List<PointF> points, List<DXPathPointType> types, DXFillMode fillMode)

Parameters

Name Type Description
points java.util.List<com.devexpress.system.drawing.PointF>

Path points.

types java.util.List<DXPathPointType>

Path point types.

fillMode DXFillMode

The fill mode.

Methods

addArc(float x, float y, float width, float height, float startAngle, float sweepAngle) Method

Adds an arc to this path.

Declaration

public void addArc(float x, float y, float width, float height, float startAngle, float sweepAngle)

Parameters

Name Type Description
x float

The X-coordinate.

y float

The Y-coordinate.

width float

The width.

height float

The height.

startAngle float

The start angle.

sweepAngle float

The sweep angle.

addArc(RectangleF rectangle, float startAngle, float sweepAngle) Method

Adds an arc to this path.

Declaration

public void addArc(RectangleF rectangle, float startAngle, float sweepAngle)

Parameters

Name Type Description
rectangle RectangleF

The arc bounds.

startAngle float

The start angle.

sweepAngle float

The sweep angle.

addBezier(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) Method

Adds a Bezier segment to this path.

Declaration

public void addBezier(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)

Parameters

Name Type Description
x1 float

The first X-coordinate.

y1 float

The first Y-coordinate.

x2 float

The second X-coordinate.

y2 float

The second Y-coordinate.

x3 float

The third X-coordinate.

y3 float

The third Y-coordinate.

x4 float

The fourth X-coordinate.

y4 float

The fourth Y-coordinate.

addBezier(PointF startPoint, PointF controlPoint1, PointF controlPoint2, PointF endPoint) Method

Adds a Bezier segment to this path.

Declaration

public void addBezier(PointF startPoint, PointF controlPoint1, PointF controlPoint2, PointF endPoint)

Parameters

Name Type Description
startPoint com.devexpress.system.drawing.PointF

The start point.

controlPoint1 com.devexpress.system.drawing.PointF

The first control point.

controlPoint2 com.devexpress.system.drawing.PointF

The second control point.

endPoint com.devexpress.system.drawing.PointF

The end point.

addBeziers(List<PointF> points) Method

Adds Bezier segments to this path.

Declaration

public void addBeziers(List<PointF> points)

Parameters

Name Type Description
points java.util.List<com.devexpress.system.drawing.PointF>

The points.

addCurve(PointF[] points, float tension) Method

Adds a curve to this path.

Declaration

public void addCurve(PointF[] points, float tension)

Parameters

Name Type Description
points com.devexpress.system.drawing.PointF[]

The points.

tension float

The tension.

addCurve(PointF[] points) Method

Adds a curve to this path.

Declaration

public void addCurve(PointF[] points)

Parameters

Name Type Description
points com.devexpress.system.drawing.PointF[]

The points.

addEllipse(float x, float y, float width, float height) Method

Adds an ellipse to this path.

Declaration

public void addEllipse(float x, float y, float width, float height)

Parameters

Name Type Description
x float

The X-coordinate.

y float

The Y-coordinate.

width float

The width.

height float

The height.

addEllipse(RectangleF rect) Method

Adds an ellipse to this path.

Declaration

public void addEllipse(RectangleF rect)

Parameters

Name Type Description
rect RectangleF

The ellipse bounds.

addLine(float x1, float y1, float x2, float y2) Method

Adds a line to this path.

Declaration

public void addLine(float x1, float y1, float x2, float y2)

Parameters

Name Type Description
x1 float

The first X-coordinate.

y1 float

The first Y-coordinate.

x2 float

The second X-coordinate.

y2 float

The second Y-coordinate.

addLine(PointF startPoint, PointF endPoint) Method

Adds a line to this path.

Declaration

public void addLine(PointF startPoint, PointF endPoint)

Parameters

Name Type Description
startPoint com.devexpress.system.drawing.PointF

The start point.

endPoint com.devexpress.system.drawing.PointF

The end point.

addLines(List<PointF> points) Method

Adds lines to this path.

Declaration

public void addLines(List<PointF> points)

Parameters

Name Type Description
points java.util.List<com.devexpress.system.drawing.PointF>

The points.

addPath(DXGraphicsPath path, boolean connect) Method

Adds the specified path to this path.

Declaration

public void addPath(DXGraphicsPath path, boolean connect)

Parameters

Name Type Description
path DXGraphicsPath

The path.

connect boolean

true if the added path should connect to the current figure; otherwise, false.

addPie(float x, float y, float width, float height, float startAngle, float sweepAngle) Method

Adds a pie shape to this path.

Declaration

public void addPie(float x, float y, float width, float height, float startAngle, float sweepAngle)

Parameters

Name Type Description
x float

The X-coordinate.

y float

The Y-coordinate.

width float

The width.

height float

The height.

startAngle float

The start angle.

sweepAngle float

The sweep angle.

addPie(Rectangle rect, float startAngle, float sweepAngle) Method

Adds a pie shape to this path.

Declaration

public void addPie(Rectangle rect, float startAngle, float sweepAngle)

Parameters

Name Type Description
rect Rectangle

The pie bounds.

startAngle float

The start angle.

sweepAngle float

The sweep angle.

addPolygon(List<PointF> points) Method

Adds a polygon to this path.

Declaration

public void addPolygon(List<PointF> points)

Parameters

Name Type Description
points java.util.List<com.devexpress.system.drawing.PointF>

The polygon points.

addRectangle(RectangleF rect) Method

Adds a rectangle to this path.

Declaration

public void addRectangle(RectangleF rect)

Parameters

Name Type Description
rect RectangleF

The rectangle.

addRectangles(List<RectangleF> rectangles) Method

Adds rectangles to this path.

Declaration

public void addRectangles(List<RectangleF> rectangles)

Parameters

Name Type Description
rectangles java.util.List<com.devexpress.system.drawing.RectangleF>

The rectangles.

addString(String text, DXFont font, PointF point, DXStringFormat stringFormat) Method

Adds a string to this path.

Declaration

public void addString(String text, DXFont font, PointF point, DXStringFormat stringFormat)

Parameters

Name Type Description
text String

The text.

font DXFont

The font.

point com.devexpress.system.drawing.PointF

The point.

stringFormat DXStringFormat

The string format.

addString(String text, DXFont font, RectangleF rect, DXStringFormat stringFormat) Method

Adds a string to this path.

Declaration

public void addString(String text, DXFont font, RectangleF rect, DXStringFormat stringFormat)

Parameters

Name Type Description
text String

The text.

font DXFont

The font.

rect RectangleF

The layout rectangle.

stringFormat DXStringFormat

The string format.

clone() Method

Creates a copy of this graphics path.

Declaration

public DXGraphicsPath clone()

Returns

Type Description
DXGraphicsPath

The cloned DXGraphicsPath object.

close() Method

Closes this graphics path.

Declaration

public void close()

closeFigure() Method

Closes the current figure.

Declaration

public void closeFigure()

flatten() Method

Flattens this path.

Declaration

public void flatten()

flatten(DXMatrix transform, float flatness) Method

Flattens this path.

Declaration

public void flatten(DXMatrix transform, float flatness)

Parameters

Name Type Description
transform DXMatrix

The transformation matrix.

flatness float

The flatness.

flatten(DXMatrix transform) Method

Flattens this path.

Declaration

public void flatten(DXMatrix transform)

Parameters

Name Type Description
transform DXMatrix

The transformation matrix.

getBounds() Method

Returns the bounds.

Declaration

public RectangleF getBounds()

Returns

Type Description
RectangleF

The path bounds.

getFillMode() Method

Returns the fill mode.

Declaration

public DXFillMode getFillMode()

Returns

Type Description
DXFillMode

The fill mode.

getLastPoint() Method

Returns the last point.

Declaration

public PointF getLastPoint()

Returns

Type Description
com.devexpress.system.drawing.PointF

The last path point.

getPathData() Method

Returns the path data.

Declaration

public DXGraphicsPathData getPathData()

Returns

Type Description
DXGraphicsPathData

The path data.

getPathPoints() Method

Returns path points.

Declaration

public List<PointF> getPathPoints()

Returns

Type Description
java.util.List<com.devexpress.system.drawing.PointF>

Path points.

getPathTypes() Method

Returns path point types.

Declaration

public List<DXPathPointType> getPathTypes()

Returns

Type Description
java.util.List<DXPathPointType>

Path point types.

getPointCount() Method

Returns the point count.

Declaration

public int getPointCount()

Returns

Type Description
int

The number of points in this path.

isVisible(float x, float y) Method

Checks whether the specified point lies inside this path.

Declaration

public boolean isVisible(float x, float y)

Parameters

Name Type Description
x float

The X-coordinate.

y float

The Y-coordinate.

Returns

Type Description
boolean

true if the specified point lies inside this path; otherwise, false.

isVisible(PointF hitPoint) Method

Checks whether the specified point lies inside this path.

Declaration

public boolean isVisible(PointF hitPoint)

Parameters

Name Type Description
hitPoint com.devexpress.system.drawing.PointF

The point.

Returns

Type Description
boolean

true if the specified point lies inside this path; otherwise, false.

reset() Method

Resets this path.

Declaration

public void reset()

setFillMode(DXFillMode value) Method

Specifies the fill mode.

Declaration

public void setFillMode(DXFillMode value)

Parameters

Name Type Description
value DXFillMode

The fill mode.

startFigure() Method

Starts a new figure.

Declaration

public void startFigure()

transform(DXMatrix matrix) Method

Transforms this path.

Declaration

public void transform(DXMatrix matrix)

Parameters

Name Type Description
matrix DXMatrix

The transformation matrix.

widen(DXPen pen, DXMatrix matrix) Method

Widens this path.

Declaration

public void widen(DXPen pen, DXMatrix matrix)

Parameters

Name Type Description
pen DXPen

The pen.

matrix DXMatrix

The transformation matrix.

widen(DXPen pen) Method

Widens this path.

Declaration

public void widen(DXPen pen)

Parameters

Name Type Description
pen DXPen

The pen.