ShapeUtil

Inheritance: java.lang.Object

public class ShapeUtil

Offer methods which helps to process shapes objects.

Constructors

ConstructorDescription
ShapeUtil()

Methods

MethodDescription
graphicsPathToGeometryPath(Shape graphicsPath)Converts a java.awt.Shape to the IGeometryPath
geometryPathToGraphicsPath(IGeometryPath geometryPath)Converts IGeometryPath to java.awt.Shape.

ShapeUtil()

public ShapeUtil()

graphicsPathToGeometryPath(Shape graphicsPath)

public static IGeometryPath graphicsPathToGeometryPath(Shape graphicsPath)

Converts a java.awt.Shape to the IGeometryPath

Parameters:

ParameterTypeDescription
graphicsPathjava.awt.ShapeGraphics path

Return value of the method call can be used to change the geometry of a IGeometryShape object with IGeometryShape.SetGeometryPaths method. |

Returns: IGeometryPath - Geometry path

geometryPathToGraphicsPath(IGeometryPath geometryPath)

public static Shape geometryPathToGraphicsPath(IGeometryPath geometryPath)

Converts IGeometryPath to java.awt.Shape. GraphicsPath can be transformed in a different ways using its convenient methods and then transformed back into the IGeometryPath to use in GeometryShape via #graphicsPathToGeometryPath(java.awt.Shape).graphicsPathToGeometryPath(java.awt.Shape) method.

Parameters:

ParameterTypeDescription
geometryPathIGeometryPath——————–

Returns: Shape - Shape path