DocumentUtils

Inheritance: java.lang.Object

public class DocumentUtils

This class provides utilities beyond the formal XPS manipulation API.

Methods

MethodDescription
createCircle(Point2D center, float radius)Creates a path geometry representing a circle.
createCircularSegment(Point2D center, float radius, float startAngle, float endAngle)Creates a path geometry representing a circular segment between two angles.
createEllipse(Point2D center, float radiusX, float radiusY)Creates a path geometry representing an ellipse.
createImage(String fileName, Rectangle2D imageBox)Creates a rectangular path filled with an image.
createImage(String fileName, Rectangle2D imageBox, ImageMode mode)Creates a rectangular path filled with an image.
createPieSlice(Point2D center, float radius, float startAngle, float endAngle)Creates a path geometry representing a circle slice between two radial rays.
createRectangle(Rectangle2D rectangle)Creates a path geometry representing a rectangle.
createRegularCircumscribedNGon(int n, Point2D center, float radius)Creates a path geometry representing a regular n-gon circumscribed around a circle.
createRegularInscribedNGon(int n, Point2D center, float radius)Creates a path geometry representing a regular n-gon inscribed in a circle.
equals(Object arg0)
getClass()
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

createCircle(Point2D center, float radius)

public XpsPathGeometry createCircle(Point2D center, float radius)

Creates a path geometry representing a circle.

Parameters:

ParameterTypeDescription
centerjava.awt.geom.Point2DThe center point of the circle.
radiusfloatThe radius of the circle.

Returns: XpsPathGeometry - The XPS path geometry.

createCircularSegment(Point2D center, float radius, float startAngle, float endAngle)

public XpsPathGeometry createCircularSegment(Point2D center, float radius, float startAngle, float endAngle)

Creates a path geometry representing a circular segment between two angles.

Parameters:

ParameterTypeDescription
centerjava.awt.geom.Point2DThe center of the circle.
radiusfloatThe radius of the circle.
startAnglefloatThe angle (degrees) of the starting ray.
endAnglefloatThe angle (degrees) of the ending ray.

Returns: XpsPathGeometry - The XPS path geometry.

createEllipse(Point2D center, float radiusX, float radiusY)

public XpsPathGeometry createEllipse(Point2D center, float radiusX, float radiusY)

Creates a path geometry representing an ellipse.

Parameters:

ParameterTypeDescription
centerjava.awt.geom.Point2DThe center point of the ellipse.
radiusXfloatThe horizontal radius of the ellipse.
radiusYfloatThe vertical radius of the ellipse.

Returns: XpsPathGeometry - The XPS path geometry.

createImage(String fileName, Rectangle2D imageBox)

public XpsPath createImage(String fileName, Rectangle2D imageBox)

Creates a rectangular path filled with an image.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringThe name of the image file.
imageBoxjava.awt.geom.Rectangle2DThe image box to fill with the image.

Returns: XpsPath - The XPS path.

createImage(String fileName, Rectangle2D imageBox, ImageMode mode)

public XpsPath createImage(String fileName, Rectangle2D imageBox, ImageMode mode)

Creates a rectangular path filled with an image.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringThe name of the image file.
imageBoxjava.awt.geom.Rectangle2DThe image box to fill with the image.
modeImageModeImage fit mode.

Returns: XpsPath - The XPS path.

createPieSlice(Point2D center, float radius, float startAngle, float endAngle)

public XpsPathGeometry createPieSlice(Point2D center, float radius, float startAngle, float endAngle)

Creates a path geometry representing a circle slice between two radial rays.

Parameters:

ParameterTypeDescription
centerjava.awt.geom.Point2DThe center of the circle.
radiusfloatThe radius of the circle.
startAnglefloatThe angle (degrees) of the starting ray.
endAnglefloatThe angle (degrees) of the ending ray.

Returns: XpsPathGeometry - The XPS path geometry.

createRectangle(Rectangle2D rectangle)

public XpsPathGeometry createRectangle(Rectangle2D rectangle)

Creates a path geometry representing a rectangle.

Parameters:

ParameterTypeDescription
rectanglejava.awt.geom.Rectangle2DThe rectangle.

Returns: XpsPathGeometry - The XPS path geometry.

createRegularCircumscribedNGon(int n, Point2D center, float radius)

public XpsPathGeometry createRegularCircumscribedNGon(int n, Point2D center, float radius)

Creates a path geometry representing a regular n-gon circumscribed around a circle.

Parameters:

ParameterTypeDescription
nintThe number of vertices.
centerjava.awt.geom.Point2DThe center of the circle.
radiusfloatThe radius of the circle.

Returns: XpsPathGeometry - The XPS path geometry.

createRegularInscribedNGon(int n, Point2D center, float radius)

public XpsPathGeometry createRegularInscribedNGon(int n, Point2D center, float radius)

Creates a path geometry representing a regular n-gon inscribed in a circle.

Parameters:

ParameterTypeDescription
nintThe number of vertices.
centerjava.awt.geom.Point2DThe center of the circle.
radiusfloatThe radius of the circle.

Returns: XpsPathGeometry - The XPS path geometry.

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

hashCode()

public native int hashCode()

Returns: int

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