ShapePath

Inheritance: java.lang.Object

public class ShapePath

Represents a creation path consisting of a series of moves, lines and curves that when combined will form a geometric shape.

Constructors

ConstructorDescription
ShapePath()Initializes a new instance of the ShapePath class.

Methods

MethodDescription
arcTo(float wR, float hR, float stAng, float swAng)Appends an elliptical arc to the current figure.
close()Closes the current figure and starts a new figure.
cubicBezierTo(float ctrX1, float ctrY1, float ctrX2, float ctrY2, float endX, float endY)Appends a cubic B\u8305zier curve to the current figure.
equals(Object arg0)
getClass()
getPathSegementList()Gets ShapeSegmentPathCollection list
hashCode()
lineTo(float x, float y)Appends a line segment to the current figure.
moveTo(float x, float y)Starts a new figure from the specified point without closing the current figure.
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

ShapePath()

public ShapePath()

Initializes a new instance of the ShapePath class.

arcTo(float wR, float hR, float stAng, float swAng)

public void arcTo(float wR, float hR, float stAng, float swAng)

Appends an elliptical arc to the current figure. The starting point is the end point of the current figure.

Parameters:

ParameterTypeDescription
wRfloatThe half-width of the rectangular area of \u9225\u5b27\u20ac\u5aa1he ellipse that draws the arc.
hRfloatThe half-height of the rectangular area of \u9225\u5b27\u20ac\u5aa1he ellipse that draws the arc.
stAngfloatThe starting angle of the arc, measured in degrees clockwise from the x-axis.
swAngfloatThe angle between startAngle and the end of the arc.

close()

public void close()

Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point.

cubicBezierTo(float ctrX1, float ctrY1, float ctrX2, float ctrY2, float endX, float endY)

public void cubicBezierTo(float ctrX1, float ctrY1, float ctrX2, float ctrY2, float endX, float endY)

Appends a cubic B\u8305zier curve to the current figure. The starting point is the end point of the current figure.

Parameters:

ParameterTypeDescription
ctrX1floatThe x-coordinate of the first control point for the curve.
ctrY1floatThe y-coordinate of the first control point for the curve.
ctrX2floatThe x-coordinate of the second control point for the curve.
ctrY2floatThe y-coordinate of the second control point for the curve.
endXfloatThe x-coordinate of the endpoint of the curve.
endYfloatThe y-coordinate of the endpoint of the curve.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getPathSegementList()

public ShapeSegmentPathCollection getPathSegementList()

Gets ShapeSegmentPathCollection list

Returns: ShapeSegmentPathCollection

hashCode()

public native int hashCode()

Returns: int

lineTo(float x, float y)

public void lineTo(float x, float y)

Appends a line segment to the current figure. The starting point is the end point of the current figure.

Parameters:

ParameterTypeDescription
xfloatThe x-coordinate of the endpoint of the line segment.
yfloatThe y-coordinate of the endpoint of the line segment.

moveTo(float x, float y)

public void moveTo(float x, float y)

Starts a new figure from the specified point without closing the current figure. All subsequent points added to the path are added to this new figure.

Parameters:

ParameterTypeDescription
xfloatThe x-coordinate of the starting point of the figure.
yfloatThe y-coordinate of the starting point of the figure.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int