PageAPI

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.xps.features.EventBasedModifications.IModificationAPI

public class PageAPI implements EventBasedModifications.IModificationAPI

The Page element modification API.

Methods

MethodDescription
add(T element)Adds a content element (Canvas, Path, or Glyphs)
insert(int index, T element)Inserts an element (Canvas, Path, or Glyphs) to the page at index position.
remove(T element)Removes an element from the page.
addCanvas()Adds a new canvas to the page.
addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)Adds new glyphs to the page.
addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)Adds new glyphs to the page.
addOutlineEntry(String description, int outlineLevel, int targetPageNumber)Adds an outline entry to the document.
addPath(XpsPathGeometry data)Adds a new path to the page.
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)Creates a new stroked elliptical arc segment.
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked)Creates a new elliptical arc segment.
createCanvas()Creates a new canvas.
createColor(XpsIccProfile iccProfile, float[] components)Creates a new color in ICC based color space.
createColor(float r, float g, float b)Creates a new color in scRGB color space.
createColor(float a, float r, float g, float b)Creates a new color in scRGB color space.
createColor(int r, int g, int b)Creates a new color in sRGB color space.
createColor(int a, int r, int g, int b)Creates a new color in sRGB color space.
createColor(Color color)Creates a new color.
createColor(String path, float[] components)Creates a new color in ICC based color space.
createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)Creates new glyphs.
createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)Creates new glyphs.
createGradientStop(XpsColor color, float offset)Creates a new gradient stop.
createGradientStop(Color color, float offset)Creates a new gradient stop.
createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)Creates a new image brush.
createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)Creates a new image brush.
createLinearGradientBrush(Point2D startPoint, Point2D endPoint)Creates a new linear gradient brush.
createLinearGradientBrush(List gradientStops, Point2D startPoint, Point2D endPoint)Creates a new linear gradient brush.
createMatrix(float m11, float m12, float m21, float m22, float m31, float m32)Creates a new affine transformation matrix.
createPath(XpsPathGeometry data)Creates a new path.
createPathFigure(Point2D startPoint)Creates a new open path figure.
createPathFigure(Point2D startPoint, boolean isClosed)Creates a new path figure.
createPathFigure(Point2D startPoint, List segments)Creates a new open path figure.
createPathFigure(Point2D startPoint, List segments, boolean isClosed)Creates a new path figure.
createPathGeometry()Creates a new path geometry.
createPathGeometry(String abbreviatedGeometry)Creates a new path geometry specified with abbreviated form.
createPathGeometry(List pathFigures)Creates a new path geometry with specified list of path figures.
createPolyBezierSegment(Point2D[] points)Creates a new set of stroked cubic B?zier curves.
createPolyBezierSegment(Point2D[] points, boolean isStroked)Creates a new set of cubic B?zier curves.
createPolyLineSegment(Point2D[] points)Creates a new stroked polygonal drawing containing an arbitrary number of individual vertices.
createPolyLineSegment(Point2D[] points, boolean isStroked)Creates a new polygonal drawing containing an arbitrary number of individual vertices.
createPolyQuadraticBezierSegment(Point2D[] points)Creates a new set of stroked quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points.
createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)Creates a new set of quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points.
createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)Creates a new radial gradient brush.
createRadialGradientBrush(List gradientStops, Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)Creates a new radial gradient brush.
createSolidColorBrush(XpsColor color)Creates a new solid color brush.
createSolidColorBrush(Color color)Creates a new solid color brush.
createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)Creates a new visual brush.
equals(Object arg0)
getClass()
getHeight()Returns the height of the page, expressed as a real number in units of the effective coordinate space.
getPageCount()Returns the number of pages in the active document.
getTotalPageCount()Returns the total number of pages in all documents inside XPS document.
getUtils()Gets the object that provides utilities beyond the formal XPS manipulation API.
getWidth()Returns the width of the page, expressed as a real number in units of the effective coordinate space.
hashCode()
insertCanvas(int index)Inserts a new canvas to the page at index position.
insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString)Inserts new glyphs to the page at index position.
insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)Inserts new glyphs to the page at index position.
insertPath(int index, XpsPathGeometry data)Inserts a new path to the page at index position.
notify()
notifyAll()
removeAt(int index)Removes an element at index position from the page.
setHeight(float value)Sets the height of the page, expressed as a real number in units of the effective coordinate space.
setWidth(float value)Sets the width of the page, expressed as a real number in units of the effective coordinate space.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

add(T element)

public T <T>add(T element)

Adds a content element (Canvas, Path, or Glyphs)

Parameters:

ParameterTypeDescription
elementTThe element to add.

Returns: T - Added element.

insert(int index, T element)

public T <T>insert(int index, T element)

Inserts an element (Canvas, Path, or Glyphs) to the page at index position.

Parameters:

ParameterTypeDescription
indexintPosition at which an element should be inserted.
elementTThe element to insert.

Returns: T - Inserted element.

remove(T element)

public T <T>remove(T element)

Removes an element from the page.

Parameters:

ParameterTypeDescription
elementTThe element to remove.

Returns: T - Removed element.

addCanvas()

public XpsCanvas addCanvas()

Adds a new canvas to the page.

Returns: XpsCanvas - Added canvas.

addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

public XpsGlyphs addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

Adds new glyphs to the page.

Parameters:

ParameterTypeDescription
fontXpsFontFont resource.
fontRenderingEmSizefloatFont size.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin Y coordinate.
unicodeStringjava.lang.StringString to be printed.

Returns: XpsGlyphs - Added glyphs.

addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

public XpsGlyphs addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

Adds new glyphs to the page.

Parameters:

ParameterTypeDescription
fontFamilyjava.lang.StringFont family.
fontRenderingEmSizefloatFont size.
fontStyleXpsFontStyleFont style.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin Y coordinate.
unicodeStringjava.lang.StringString to be printed.

Returns: XpsGlyphs - Added glyphs.

addOutlineEntry(String description, int outlineLevel, int targetPageNumber)

public void addOutlineEntry(String description, int outlineLevel, int targetPageNumber)

Adds an outline entry to the document.

Parameters:

ParameterTypeDescription
descriptionjava.lang.StringThe entry description.
outlineLevelintThe outline level.
targetPageNumberintThe target page number.

addPath(XpsPathGeometry data)

public XpsPath addPath(XpsPathGeometry data)

Adds a new path to the page.

Parameters:

ParameterTypeDescription
dataXpsPathGeometryThe geometry of the path.

Returns: XpsPath - Added path.

createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)

public XpsArcSegment createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)

Creates a new stroked elliptical arc segment.

Parameters:

ParameterTypeDescription
pointjava.awt.geom.Point2DThe end point of the elliptical arc.
sizejava.awt.geom.Dimension2DThe x and y radius of the elliptical arc as an x,y pair.
rotationAnglefloatIndicates how the ellipse is rotated relative to the current coordinate system.
isLargeArcbooleanDetermines whether the arc is drawn with a sweep of 180 or greater.
sweepDirectionXpsSweepDirectionThe direction in which the arc is drawn.

Returns: XpsArcSegment - New elliptical arc segment.

createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked)

public XpsArcSegment createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked)

Creates a new elliptical arc segment.

Parameters:

ParameterTypeDescription
pointjava.awt.geom.Point2DThe end point of the elliptical arc.
sizejava.awt.geom.Dimension2DThe x and y radius of the elliptical arc as an x,y pair.
rotationAnglefloatIndicates how the ellipse is rotated relative to the current coordinate system.
isLargeArcbooleanDetermines whether the arc is drawn with a sweep of 180 or greater.
sweepDirectionXpsSweepDirectionThe direction in which the arc is drawn.
isStrokedbooleanSpecifies whether the stroke for this segment of the path is drawn.

Returns: XpsArcSegment - New elliptical arc segment.

createCanvas()

public XpsCanvas createCanvas()

Creates a new canvas.

Returns: XpsCanvas - New canvas.

createColor(XpsIccProfile iccProfile, float[] components)

public XpsColor createColor(XpsIccProfile iccProfile, float[] components)

Creates a new color in ICC based color space.

Parameters:

ParameterTypeDescription
iccProfileXpsIccProfileThe ICC profile resource.
componentsfloat[]Color components.

Returns: XpsColor - New color.

createColor(float r, float g, float b)

public XpsColor createColor(float r, float g, float b)

Creates a new color in scRGB color space.

Parameters:

ParameterTypeDescription
rfloatThe red color component.
gfloatThe green color component.
bfloatThe blue color component.

Returns: XpsColor - New color.

createColor(float a, float r, float g, float b)

public XpsColor createColor(float a, float r, float g, float b)

Creates a new color in scRGB color space.

Parameters:

ParameterTypeDescription
afloatThe alpha color component.
rfloatThe red color component.
gfloatThe green color component.
bfloatThe blue color component.

Returns: XpsColor - New color.

createColor(int r, int g, int b)

public XpsColor createColor(int r, int g, int b)

Creates a new color in sRGB color space.

Parameters:

ParameterTypeDescription
rintThe red color component.
gintThe green color component.
bintThe blue color component.

Returns: XpsColor - New color.

createColor(int a, int r, int g, int b)

public XpsColor createColor(int a, int r, int g, int b)

Creates a new color in sRGB color space.

Parameters:

ParameterTypeDescription
aintThe alpha color component.
rintThe red color component.
gintThe green color component.
bintThe blue color component.

Returns: XpsColor - New color.

createColor(Color color)

public XpsColor createColor(Color color)

Creates a new color.

Parameters:

ParameterTypeDescription
colorjava.awt.ColorA native color instance for RGB color.

Returns: XpsColor - New color.

createColor(String path, float[] components)

public XpsColor createColor(String path, float[] components)

Creates a new color in ICC based color space.

Parameters:

ParameterTypeDescription
pathjava.lang.StringThe path to the ICC profile.
componentsfloat[]Color components.

Returns: XpsColor - New color.

createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

public XpsGlyphs createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

Creates new glyphs.

Parameters:

ParameterTypeDescription
fontXpsFontFont resource.
fontRenderingEmSizefloatFont size.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin Y coordinate.
unicodeStringjava.lang.StringString to be printed.

Returns: XpsGlyphs - New glyphs.

createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

public XpsGlyphs createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

Creates new glyphs.

Parameters:

ParameterTypeDescription
fontFamilyjava.lang.StringFont family.
fontRenderingEmSizefloatFont size.
fontStyleXpsFontStyleFont style.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin Y coordinate.
unicodeStringjava.lang.StringString to be printed.

Returns: XpsGlyphs - New glyphs.

createGradientStop(XpsColor color, float offset)

public XpsGradientStop createGradientStop(XpsColor color, float offset)

Creates a new gradient stop.

Parameters:

ParameterTypeDescription
colorXpsColorThe gradient stop color.
offsetfloatThe gradient offset.

Returns: XpsGradientStop - New gradient stop.

createGradientStop(Color color, float offset)

public XpsGradientStop createGradientStop(Color color, float offset)

Creates a new gradient stop.

Parameters:

ParameterTypeDescription
colorjava.awt.ColorThe gradient stop color.
offsetfloatThe gradient offset.

Returns: XpsGradientStop - New gradient stop.

createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)

public XpsImageBrush createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)

Creates a new image brush.

Parameters:

ParameterTypeDescription
imageXpsImageAn image resource.
viewboxjava.awt.geom.Rectangle2DThe position and dimensions of the brush’s source content.
viewportjava.awt.geom.Rectangle2DThe region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied

Returns: XpsImageBrush - New image brush.

createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)

public XpsImageBrush createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)

Creates a new image brush.

Parameters:

ParameterTypeDescription
imagePathjava.lang.StringThe path to the image to take as a brush tile.
viewboxjava.awt.geom.Rectangle2DThe position and dimensions of the brush’s source content.
viewportjava.awt.geom.Rectangle2DThe region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied

Returns: XpsImageBrush - New image brush.

createLinearGradientBrush(Point2D startPoint, Point2D endPoint)

public XpsLinearGradientBrush createLinearGradientBrush(Point2D startPoint, Point2D endPoint)

Creates a new linear gradient brush.

Parameters:

ParameterTypeDescription
startPointjava.awt.geom.Point2DThe starting point of the linear gradient.
endPointjava.awt.geom.Point2DThe end point of the linear gradient.

Returns: XpsLinearGradientBrush - New linear gradient brush.

createLinearGradientBrush(List gradientStops, Point2D startPoint, Point2D endPoint)

public XpsLinearGradientBrush createLinearGradientBrush(List<XpsGradientStop> gradientStops, Point2D startPoint, Point2D endPoint)

Creates a new linear gradient brush.

Parameters:

ParameterTypeDescription
gradientStopsjava.util.List<com.aspose.xps.XpsGradientStop>The list of gradient stops.
startPointjava.awt.geom.Point2DThe starting point of the linear gradient.
endPointjava.awt.geom.Point2DThe end point of the linear gradient.

Returns: XpsLinearGradientBrush - New linear gradient brush.

createMatrix(float m11, float m12, float m21, float m22, float m31, float m32)

public XpsMatrix createMatrix(float m11, float m12, float m21, float m22, float m31, float m32)

Creates a new affine transformation matrix.

Parameters:

ParameterTypeDescription
m11floatElement 11.
m12floatElement 12.
m21floatElement 21.
m22floatElement 22.
m31floatElement 31.
m32floatElement 32.

Returns: XpsMatrix - New affine transformation matrix.

createPath(XpsPathGeometry data)

public XpsPath createPath(XpsPathGeometry data)

Creates a new path.

Parameters:

ParameterTypeDescription
dataXpsPathGeometryThe geometry of the path.

Returns: XpsPath - New path.

createPathFigure(Point2D startPoint)

public XpsPathFigure createPathFigure(Point2D startPoint)

Creates a new open path figure.

Parameters:

ParameterTypeDescription
startPointjava.awt.geom.Point2DThe starting point for the first segment of the path figure.

Returns: XpsPathFigure - New path figure.

createPathFigure(Point2D startPoint, boolean isClosed)

public XpsPathFigure createPathFigure(Point2D startPoint, boolean isClosed)

Creates a new path figure.

Parameters:

ParameterTypeDescription
startPointjava.awt.geom.Point2DThe starting point for the first segment of the path figure.
isClosedbooleanSpecifies whether the path is closed. If set to true, the stroke is drawn “closed”, that is, the last point in the last segment of the path figure is connected with the point specified in the StartPoint attribute, otherwise the stroke is drawn “open”, and the last point is not connected to the start point. Only applicable if the path figure is used in a Path element that specifies a stroke.

Returns: XpsPathFigure - New path figure.

createPathFigure(Point2D startPoint, List segments)

public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments)

Creates a new open path figure.

Parameters:

ParameterTypeDescription
startPointjava.awt.geom.Point2DThe starting point for the first segment of the path figure.
segmentsjava.util.List<com.aspose.xps.XpsPathSegment>List of path segments.

Returns: XpsPathFigure - New path figure.

createPathFigure(Point2D startPoint, List segments, boolean isClosed)

public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments, boolean isClosed)

Creates a new path figure.

Parameters:

ParameterTypeDescription
startPointjava.awt.geom.Point2DThe starting point for the first segment of the path figure.
segmentsjava.util.List<com.aspose.xps.XpsPathSegment>List of path segments.
isClosedbooleanSpecifies whether the path is closed. If set to true, the stroke is drawn “closed”, that is, the last point in the last segment of the path figure is connected with the point specified in the StartPoint attribute, otherwise the stroke is drawn “open”, and the last point is not connected to the start point. Only applicable if the path figure is used in a Path element that specifies a stroke.

Returns: XpsPathFigure - New path figure.

createPathGeometry()

public XpsPathGeometry createPathGeometry()

Creates a new path geometry.

Returns: XpsPathGeometry - New path geometry.

createPathGeometry(String abbreviatedGeometry)

public XpsPathGeometry createPathGeometry(String abbreviatedGeometry)

Creates a new path geometry specified with abbreviated form.

Parameters:

ParameterTypeDescription
abbreviatedGeometryjava.lang.StringAbbreviated form of path geometry.

Returns: XpsPathGeometry - New path geometry.

createPathGeometry(List pathFigures)

public XpsPathGeometry createPathGeometry(List<XpsPathFigure> pathFigures)

Creates a new path geometry with specified list of path figures.

Parameters:

ParameterTypeDescription
pathFiguresjava.util.List<com.aspose.xps.XpsPathFigure>List of path figures.

Returns: XpsPathGeometry - New path geometry.

createPolyBezierSegment(Point2D[] points)

public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points)

Creates a new set of stroked cubic B?zier curves.

Parameters:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]Control points for multiple B?zier segments.

Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.

createPolyBezierSegment(Point2D[] points, boolean isStroked)

public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points, boolean isStroked)

Creates a new set of cubic B?zier curves.

Parameters:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]Control points for multiple B?zier segments.
isStrokedbooleanSpecifies whether the stroke for this segment of the path is drawn.

Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.

createPolyLineSegment(Point2D[] points)

public XpsPolyLineSegment createPolyLineSegment(Point2D[] points)

Creates a new stroked polygonal drawing containing an arbitrary number of individual vertices.

Parameters:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]A set of coordinates for the multiple segments that define the poly line segment.

Returns: XpsPolyLineSegment - New polygonal drawing segment.

createPolyLineSegment(Point2D[] points, boolean isStroked)

public XpsPolyLineSegment createPolyLineSegment(Point2D[] points, boolean isStroked)

Creates a new polygonal drawing containing an arbitrary number of individual vertices.

Parameters:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]A set of coordinates for the multiple segments that define the poly line segment.
isStrokedbooleanSpecifies whether the stroke for this segment of the path is drawn.

Returns: XpsPolyLineSegment - New polygonal drawing segment.

createPolyQuadraticBezierSegment(Point2D[] points)

public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points)

Creates a new set of stroked quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points.

Parameters:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]Control points for multiple quadratic B?zier segments.

Returns: XpsPolyQuadraticBezierSegment - New quadratic B?zier curves segment.

createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)

public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)

Creates a new set of quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points.

Parameters:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]Control points for multiple quadratic B?zier segments.
isStrokedbooleanSpecifies whether the stroke for this segment of the path is drawn.

Returns: XpsPolyQuadraticBezierSegment - New quadratic B?zier curves segment.

createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

public XpsRadialGradientBrush createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

Creates a new radial gradient brush.

Parameters:

ParameterTypeDescription
centerjava.awt.geom.Point2DThe center point of the radial gradient (that is, the center of the ellipse).
gradientOriginjava.awt.geom.Point2DThe origin point of the radial gradient.
radiusXfloatThe radius in the x dimension of the ellipse which defines the radial gradient.
radiusYfloatThe radius in the y dimension of the ellipse which defines the radial gradient.

Returns: XpsRadialGradientBrush - New radial gradient brush.

createRadialGradientBrush(List gradientStops, Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

public XpsRadialGradientBrush createRadialGradientBrush(List<XpsGradientStop> gradientStops, Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

Creates a new radial gradient brush.

Parameters:

ParameterTypeDescription
gradientStopsjava.util.List<com.aspose.xps.XpsGradientStop>The list of gradient stops.
centerjava.awt.geom.Point2DThe center point of the radial gradient (that is, the center of the ellipse).
gradientOriginjava.awt.geom.Point2DThe origin point of the radial gradient.
radiusXfloatThe radius in the x dimension of the ellipse which defines the radial gradient.
radiusYfloatThe radius in the y dimension of the ellipse which defines the radial gradient.

Returns: XpsRadialGradientBrush - New radial gradient brush.

createSolidColorBrush(XpsColor color)

public XpsSolidColorBrush createSolidColorBrush(XpsColor color)

Creates a new solid color brush.

Parameters:

ParameterTypeDescription
colorXpsColorThe color for filled elements.

Returns: XpsSolidColorBrush - New solid color brush.

createSolidColorBrush(Color color)

public XpsSolidColorBrush createSolidColorBrush(Color color)

Creates a new solid color brush.

Parameters:

ParameterTypeDescription
colorjava.awt.ColorThe color for filled elements.

Returns: XpsSolidColorBrush - New solid color brush.

createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)

public XpsVisualBrush createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)

Creates a new visual brush.

Parameters:

ParameterTypeDescription
elementXpsContentElementThe XPS element (Canvas, Path, or Glyphs) for Visual property od visual brush.
viewboxjava.awt.geom.Rectangle2DThe position and dimensions of the brush’s source content.
viewportjava.awt.geom.Rectangle2DThe region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied

Returns: XpsVisualBrush - New visual brush.

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

getHeight()

public float getHeight()

Returns the height of the page, expressed as a real number in units of the effective coordinate space.

Returns: float - The height of the page.

getPageCount()

public int getPageCount()

Returns the number of pages in the active document.

Returns: int - The number of pages in the active document.

getTotalPageCount()

public int getTotalPageCount()

Returns the total number of pages in all documents inside XPS document.

Returns: int - The total number of pages in all documents inside XPS document.

getUtils()

public DocumentUtils getUtils()

Gets the object that provides utilities beyond the formal XPS manipulation API.

Returns: DocumentUtils - The object that provides utilities beyond the formal XPS manipulation API.

getWidth()

public float getWidth()

Returns the width of the page, expressed as a real number in units of the effective coordinate space.

Returns: float - The width of the page.

hashCode()

public native int hashCode()

Returns: int

insertCanvas(int index)

public XpsCanvas insertCanvas(int index)

Inserts a new canvas to the page at index position.

Parameters:

ParameterTypeDescription
indexintPosition at which a new canvas should be inserted.

Returns: XpsCanvas - Inserted canvas.

insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString)

public XpsGlyphs insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString)

Inserts new glyphs to the page at index position.

Parameters:

ParameterTypeDescription
indexintPosition at which new glyphs should be inserted.
fontXpsFontFont resource.
fontSizefloatFont size.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin Y coordinate.
unicodeStringjava.lang.StringString to be printed.

Returns: XpsGlyphs - Inserted glyphs.

insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

public XpsGlyphs insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

Inserts new glyphs to the page at index position.

Parameters:

ParameterTypeDescription
indexintPosition at which new glyphs should be inserted.
fontFamilyjava.lang.StringFont family.
fontSizefloatFont size.
fontStyleXpsFontStyleFont style.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin Y coordinate.
unicodeStringjava.lang.StringString to be printed.

Returns: XpsGlyphs - Inserted glyphs.

insertPath(int index, XpsPathGeometry data)

public XpsPath insertPath(int index, XpsPathGeometry data)

Inserts a new path to the page at index position.

Parameters:

ParameterTypeDescription
indexintPosition at which a new path should be inserted.
dataXpsPathGeometryThe geometry of the path.

Returns: XpsPath - Inserted path.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeAt(int index)

public XpsContentElement removeAt(int index)

Removes an element at index position from the page.

Parameters:

ParameterTypeDescription
indexintPosition at which element should be removed.

Returns: XpsContentElement - Removed element.

setHeight(float value)

public void setHeight(float value)

Sets the height of the page, expressed as a real number in units of the effective coordinate space.

Parameters:

ParameterTypeDescription
valuefloatThe height of the page.

setWidth(float value)

public void setWidth(float value)

Sets the width of the page, expressed as a real number in units of the effective coordinate space.

Parameters:

ParameterTypeDescription
valuefloatThe width of the page.

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