GeometryPath

GeometryPath class

Represents geometry path of GeometryShape

GeometryPath

NameDescription
GeometryPath()Creates instance of GeometryPath

Result: GeometryPath


arcTo

NameDescription
arcTo (float, float, float, float)Appends the specified arc to the path.

Parameters:

NameTypeDescription
widthfloatWidth of the rectangle
heigthfloatHeight of the rectangle
startAnglefloatStart angle.
sweepAnglefloatSweep angle/

closeFigure

NameDescription
closeFigure ()Closes the current figure of this path

cubicBezierTo

NameDescription
cubicBezierTo (Point2D.Float, Point2D.Float, Point2D.Float)Adds cubic Bezier curve at the end the path

Parameters:

NameTypeDescription
point1Point2D.FloatFirst direction point
point2Point2D.FloatSecond direction point
point3Point2D.FloatEnd point

cubicBezierTo

NameDescription
cubicBezierTo (float, float, float, float, float, float)Adds cubic Bezier curve at the end the path

Parameters:

NameTypeDescription
x1floatX coordinate of first direction point
y1floatY coordinate of first direction point
x2floatX coordinate of second direction point
y2floatY coordinate of second direction point
x3floatX coordinate of end point
y3floatY coordinate of end point

cubicBezierTo

NameDescription
cubicBezierTo (Point2D.Float, Point2D.Float, Point2D.Float, long)Adds cubic Bezier curve to the specified place of the path

Parameters:

NameTypeDescription
point1Point2D.FloatFirst direction point
point2Point2D.FloatSecond direction point
point3Point2D.FloatEnd point
indexlongIndex of segment in PathData

Error

ErrorCondition
ArgumentOutOfRangeExceptionSegment index is out of PathData range

cubicBezierTo

NameDescription
cubicBezierTo (float, float, float, float, float, float, long)Adds cubic Bezier curve to the specified place of the path

Parameters:

NameTypeDescription
x1floatX coordinate of first direction point
y1floatY coordinate of first direction point
x2floatX coordinate of second direction point
y2floatY coordinate of second direction point
x3floatX coordinate of end point
y3floatY coordinate of end point
indexlongIndex of segment in PathData

Error

ErrorCondition
ArgumentOutOfRangeExceptionSegment index is out of PathData range

getFillMode

NameDescription
getFillMode ()Sets fill mode

Result: byte


getPathData

NameDescription
getPathData ()Returns geometry path of GeometryShape as an array of path segments.

Result: PathSegment


getStroke

NameDescription
getStroke ()Sets stroke appearance

Result: boolean


lineTo

NameDescription
lineTo (Point2D.Float)Adds line to the end of the path

Parameters:

NameTypeDescription
pointPoint2D.FloatEnd point of the line

lineTo

NameDescription
lineTo (float, float)Adds line to the end of the path

Parameters:

NameTypeDescription
xfloatX coordinate of the end point of the line
yfloatY coordinate of the end point of the line

lineTo

NameDescription
lineTo (Point2D.Float, long)Adds line to the specified place of the path

Parameters:

NameTypeDescription
pointPoint2D.FloatEnd point
indexlongIndex of segment in PathData

Error

ErrorCondition
ArgumentOutOfRangeExceptionSegment index is out of PathData range

lineTo

NameDescription
lineTo (float, float, long)Adds line to the specified place of the path

Parameters:

NameTypeDescription
xfloatX coordinate of the point
yfloatY coordinate of the point
indexlongIndex of segment in PathData

Error

ErrorCondition
ArgumentOutOfRangeExceptionSegment index is out of PathData range

moveTo

NameDescription
moveTo (Point2D.Float)Sets next point position.

Parameters:

NameTypeDescription
pointPoint2D.FloatPoint position

moveTo

NameDescription
moveTo (float, float)Sets next point position.

Parameters:

NameTypeDescription
xfloatX coordinate of the point
yfloatY Coordinate of the point

quadraticBezierTo

NameDescription
quadraticBezierTo (Point2D.Float, Point2D.Float)Adds quadratic Bezier curve at the end the path

Parameters:

NameTypeDescription
point1Point2D.FloatDirection point
point2Point2D.FloatEnd point

quadraticBezierTo

NameDescription
quadraticBezierTo (float, float, float, float)Adds quadratic Bezier curve at the end the path

Parameters:

NameTypeDescription
x1floatX coordinate of direction point
y1floatY coordinate of direction point
x2floatX coordinate of end point
y2floatY coordinate of end point

quadraticBezierTo

NameDescription
quadraticBezierTo (Point2D.Float, Point2D.Float, long)Adds quadratic Bezier curve to the specified place of the path

Parameters:

NameTypeDescription
point1Point2D.FloatDirection point
point2Point2D.FloatEnd point
indexlongIndex of segment in PathData

Error

ErrorCondition
ArgumentOutOfRangeExceptionSegment index is out of PathData range

quadraticBezierTo

NameDescription
quadraticBezierTo (float, float, float, float, long)Adds quadratic Bezier curve to the specified place of the path

Parameters:

NameTypeDescription
x1floatX coordinate of direction point
y1floatY coordinate of direction point
x2floatX coordinate of end point
y2floatY coordinate of end point
indexlongIndex of segment in PathData

Error

ErrorCondition
ArgumentOutOfRangeExceptionSegment index is out of PathData range

removeAt

NameDescription
removeAt (int)Removes segment at the specified index of the geometry path.

Parameters:

NameTypeDescription
indexintIndex of the geometry path that should be deleted.

setFillMode

NameDescription
setFillMode (byte)Sets fill mode

setStroke

NameDescription
setStroke (boolean)Sets stroke appearance