DocumentUtils
Inheritance: java.lang.Object
public class DocumentUtils
This class provides utilities beyond the formal XPS manipulation API.
Methods
createCircle(Point2D center, float radius)
public XpsPathGeometry createCircle(Point2D center, float radius)
Creates a path geometry representing a circle.
Parameters:
Parameter | Type | Description |
---|---|---|
center | java.awt.geom.Point2D | The center point of the circle. |
radius | float | The 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:
Parameter | Type | Description |
---|---|---|
center | java.awt.geom.Point2D | The center of the circle. |
radius | float | The radius of the circle. |
startAngle | float | The angle (degrees) of the starting ray. |
endAngle | float | The 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:
Parameter | Type | Description |
---|---|---|
center | java.awt.geom.Point2D | The center point of the ellipse. |
radiusX | float | The horizontal radius of the ellipse. |
radiusY | float | The 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:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The name of the image file. |
imageBox | java.awt.geom.Rectangle2D | The 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:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The name of the image file. |
imageBox | java.awt.geom.Rectangle2D | The image box to fill with the image. |
mode | ImageMode | Image 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:
Parameter | Type | Description |
---|---|---|
center | java.awt.geom.Point2D | The center of the circle. |
radius | float | The radius of the circle. |
startAngle | float | The angle (degrees) of the starting ray. |
endAngle | float | The 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:
Parameter | Type | Description |
---|---|---|
rectangle | java.awt.geom.Rectangle2D | The 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:
Parameter | Type | Description |
---|---|---|
n | int | The number of vertices. |
center | java.awt.geom.Point2D | The center of the circle. |
radius | float | The 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:
Parameter | Type | Description |
---|---|---|
n | int | The number of vertices. |
center | java.awt.geom.Point2D | The center of the circle. |
radius | float | The radius of the circle. |
Returns: XpsPathGeometry - The XPS path geometry.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |