PageAPI
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.xps.features.EventBasedModifications.IModificationAPI
public class PageAPI implements EventBasedModifications.IModificationAPI
Page 元素修改 API。
方法
add(T element)
public T <T>add(T element)
添加内容元素(Canvas、Path 或 Glyphs)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 元素 | T | 要添加的元素。 |
Returns: T - 已添加的元素。
insert(int index, T element)
public T <T>insert(int index, T element)
在页面的索引位置插入元素(Canvas、Path 或 Glyphs)。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| index | int | 应插入元素的位置。 |
| 元素 | T | 要插入的元素。 |
Returns: T - 已插入的元素。
remove(T element)
public T <T>remove(T element)
从页面中移除元素。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 元素 | T | 要删除的元素。 |
Returns: T - 已删除的元素。
addCanvas()
public XpsCanvas addCanvas()
向页面添加新的画布。
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)
向页面添加新的字形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| font | XpsFont | 字体资源。 |
| fontRenderingEmSize | float | 字体大小。 |
| originX | float | 字形原点 X 坐标。 |
| originY | float | 字形原点 Y 坐标。 |
| unicodeString | java.lang.String | 要打印的字符串。 |
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)
向页面添加新的字形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontFamily | java.lang.String | 字体族。 |
| fontRenderingEmSize | float | 字体大小。 |
| fontStyle | XpsFontStyle | 字体样式。 |
| originX | float | 字形原点 X 坐标。 |
| originY | float | 字形原点 Y 坐标。 |
| unicodeString | java.lang.String | 要打印的字符串。 |
Returns: XpsGlyphs - Added glyphs.
addOutlineEntry(String description, int outlineLevel, int targetPageNumber)
public void addOutlineEntry(String description, int outlineLevel, int targetPageNumber)
向文档添加大纲条目。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| description | java.lang.String | 条目描述。 |
| outlineLevel | int | 大纲级别。 |
| targetPageNumber | int | 目标页码。 |
addPath(XpsPathGeometry data)
public XpsPath addPath(XpsPathGeometry data)
向页面添加新的路径。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| data | XpsPathGeometry | 路径的几何形状。 |
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)
创建一个新的描边椭圆弧段。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| point | java.awt.geom.Point2D | 椭圆弧的终点。 |
| 大小 | java.awt.geom.Dimension2D | 椭圆弧的 x 和 y 半径,以 x,y 对的形式。 |
| rotationAngle | float | 指示椭圆相对于当前坐标系的旋转方式。 |
| isLargeArc | boolean | 确定弧线的扫掠是否为 180 度或更大。 |
| sweepDirection | XpsSweepDirection | 弧线绘制的方向。 |
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)
创建一个新的椭圆弧段。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| point | java.awt.geom.Point2D | 椭圆弧的终点。 |
| 大小 | java.awt.geom.Dimension2D | 椭圆弧的 x 和 y 半径,以 x,y 对的形式。 |
| rotationAngle | float | 指示椭圆相对于当前坐标系的旋转方式。 |
| isLargeArc | boolean | 确定弧线的扫掠是否为 180 度或更大。 |
| sweepDirection | XpsSweepDirection | 弧线绘制的方向。 |
| isStroked | boolean | 指定路径此段的描边是否绘制。 |
Returns: XpsArcSegment - New elliptical arc segment.
createCanvas()
public XpsCanvas createCanvas()
创建一个新的画布。
Returns: XpsCanvas - New canvas.
createColor(XpsIccProfile iccProfile, float[] components)
public XpsColor createColor(XpsIccProfile iccProfile, float[] components)
在基于 ICC 的色彩空间中创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| iccProfile | XpsIccProfile | ICC 配置文件资源。 |
| components | float[] | 颜色分量。 |
Returns: XpsColor - New color.
createColor(float r, float g, float b)
public XpsColor createColor(float r, float g, float b)
在 scRGB 色彩空间中创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| r | float | 红色分量。 |
| g | float | 绿色分量。 |
| b | float | 蓝色分量。 |
Returns: XpsColor - New color.
createColor(float a, float r, float g, float b)
public XpsColor createColor(float a, float r, float g, float b)
在 scRGB 色彩空间中创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| a | float | Alpha 颜色分量。 |
| r | float | 红色分量。 |
| g | float | 绿色分量。 |
| b | float | 蓝色分量。 |
Returns: XpsColor - New color.
createColor(int r, int g, int b)
public XpsColor createColor(int r, int g, int b)
在 sRGB 色彩空间中创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| r | int | 红色分量。 |
| g | int | 绿色分量。 |
| b | int | 蓝色分量。 |
Returns: XpsColor - New color.
createColor(int a, int r, int g, int b)
public XpsColor createColor(int a, int r, int g, int b)
在 sRGB 色彩空间中创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| a | int | Alpha 颜色分量。 |
| r | int | 红色分量。 |
| g | int | 绿色分量。 |
| b | int | 蓝色分量。 |
Returns: XpsColor - New color.
createColor(Color color)
public XpsColor createColor(Color color)
创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| color | java.awt.Color | RGB 颜色的本机颜色实例。 |
Returns: XpsColor - New color.
createColor(String path, float[] components)
public XpsColor createColor(String path, float[] components)
在基于 ICC 的色彩空间中创建新颜色。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| path | java.lang.String | ICC 配置文件的路径。 |
| components | float[] | 颜色分量。 |
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)
创建新字形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| font | XpsFont | 字体资源。 |
| fontRenderingEmSize | float | 字体大小。 |
| originX | float | 字形原点 X 坐标。 |
| originY | float | 字形原点 Y 坐标。 |
| unicodeString | java.lang.String | 要打印的字符串。 |
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)
创建新字形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontFamily | java.lang.String | 字体族。 |
| fontRenderingEmSize | float | 字体大小。 |
| fontStyle | XpsFontStyle | 字体样式。 |
| originX | float | 字形原点 X 坐标。 |
| originY | float | 字形原点 Y 坐标。 |
| unicodeString | java.lang.String | 要打印的字符串。 |
Returns: XpsGlyphs - New glyphs.
createGradientStop(XpsColor color, float offset)
public XpsGradientStop createGradientStop(XpsColor color, float offset)
创建新的渐变停止点。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| color | XpsColor | 渐变停止颜色。 |
| 偏移量 | float | 渐变偏移量。 |
Returns: XpsGradientStop - New gradient stop.
createGradientStop(Color color, float offset)
public XpsGradientStop createGradientStop(Color color, float offset)
创建新的渐变停止点。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| color | java.awt.Color | 渐变停止颜色。 |
| 偏移量 | float | 渐变偏移量。 |
Returns: XpsGradientStop - New gradient stop.
createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)
public XpsImageBrush createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)
创建新的图像画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| image | XpsImage | 图像资源。 |
| 视图框 | java.awt.geom.Rectangle2D | 画笔源内容的位置和尺寸。 |
| 视口 | java.awt.geom.Rectangle2D | 在包含坐标空间中,主画笔瓦片的区域(可能会重复)被用于填充画笔所应用的区域。 |
Returns: XpsImageBrush - New image brush.
createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)
public XpsImageBrush createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)
创建新的图像画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 图像路径 | java.lang.String | 用作画笔瓦片的图像路径。 |
| 视图框 | java.awt.geom.Rectangle2D | 画笔源内容的位置和尺寸。 |
| 视口 | java.awt.geom.Rectangle2D | 在包含坐标空间中,主画笔瓦片的区域(可能会重复)被用于填充画笔所应用的区域。 |
Returns: XpsImageBrush - New image brush.
createLinearGradientBrush(Point2D startPoint, Point2D endPoint)
public XpsLinearGradientBrush createLinearGradientBrush(Point2D startPoint, Point2D endPoint)
创建新的线性渐变画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 起始点 | java.awt.geom.Point2D | 线性渐变的起始点。 |
| 结束点 | java.awt.geom.Point2D | 线性渐变的结束点。 |
Returns: XpsLinearGradientBrush - New linear gradient brush.
createLinearGradientBrush(List gradientStops, Point2D startPoint, Point2D endPoint)
public XpsLinearGradientBrush createLinearGradientBrush(List<XpsGradientStop> gradientStops, Point2D startPoint, Point2D endPoint)
创建新的线性渐变画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 渐变停止点 | java.util.List<com.aspose.xps.XpsGradientStop> | 渐变停止点的列表。 |
| 起始点 | java.awt.geom.Point2D | 线性渐变的起始点。 |
| 结束点 | java.awt.geom.Point2D | 线性渐变的结束点。 |
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)
创建新的仿射变换矩阵。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| m11 | float | 元素 11。 |
| m12 | float | 元素 12。 |
| m21 | float | 元素 21。 |
| m22 | float | 元素 22。 |
| m31 | float | 元素 31。 |
| m32 | float | 元素 32。 |
Returns: XpsMatrix - New affine transformation matrix.
createPath(XpsPathGeometry data)
public XpsPath createPath(XpsPathGeometry data)
创建新的路径。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| data | XpsPathGeometry | 路径的几何形状。 |
Returns: XpsPath - New path.
createPathFigure(Point2D startPoint)
public XpsPathFigure createPathFigure(Point2D startPoint)
创建新的开放路径图形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 起始点 | java.awt.geom.Point2D | 路径图形的第一个段的起始点。 |
Returns: XpsPathFigure - New path figure.
createPathFigure(Point2D startPoint, boolean isClosed)
public XpsPathFigure createPathFigure(Point2D startPoint, boolean isClosed)
创建新的路径图形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 起始点 | java.awt.geom.Point2D | 路径图形的第一个段的起始点。 |
| isClosed | boolean | 指定路径是否闭合。如果设置为 true,则描边以 “closed” 方式绘制,即路径图形最后一个段的最后一点会连接到 StartPoint 属性指定的点;否则描边以 “open” 方式绘制,最后一点不会连接到起始点。仅在路径图形用于指定描边的 Path 元素时适用。 |
Returns: XpsPathFigure - New path figure.
createPathFigure(Point2D startPoint, List segments)
public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments)
创建新的开放路径图形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 起始点 | java.awt.geom.Point2D | 路径图形的第一个段的起始点。 |
| segments | java.util.List<com.aspose.xps.XpsPathSegment> | 路径段的列表。 |
Returns: XpsPathFigure - New path figure.
createPathFigure(Point2D startPoint, List segments, boolean isClosed)
public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments, boolean isClosed)
创建新的路径图形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 起始点 | java.awt.geom.Point2D | 路径图形的第一个段的起始点。 |
| segments | java.util.List<com.aspose.xps.XpsPathSegment> | 路径段的列表。 |
| isClosed | boolean | 指定路径是否闭合。如果设置为 true,则描边以 “closed” 方式绘制,即路径图形最后一个段的最后一点会连接到 StartPoint 属性指定的点;否则描边以 “open” 方式绘制,最后一点不会连接到起始点。仅在路径图形用于指定描边的 Path 元素时适用。 |
Returns: XpsPathFigure - New path figure.
createPathGeometry()
public XpsPathGeometry createPathGeometry()
创建新的路径几何体。
Returns: XpsPathGeometry - New path geometry.
createPathGeometry(String abbreviatedGeometry)
public XpsPathGeometry createPathGeometry(String abbreviatedGeometry)
创建一个使用简写形式指定的新路径几何体。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| abbreviatedGeometry | java.lang.String | 路径几何的简写形式。 |
Returns: XpsPathGeometry - New path geometry.
createPathGeometry(List pathFigures)
public XpsPathGeometry createPathGeometry(List<XpsPathFigure> pathFigures)
创建一个使用指定路径图形列表的新路径几何体。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| pathFigures | java.util.List<com.aspose.xps.XpsPathFigure> | 路径图形的列表。 |
Returns: XpsPathGeometry - New path geometry.
createPolyBezierSegment(Point2D[] points)
public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points)
创建一组新的描边立方 B?zier 曲线。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | java.awt.geom.Point2D[] | 多个 B?bezier 段的控制点。 |
Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.
createPolyBezierSegment(Point2D[] points, boolean isStroked)
public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points, boolean isStroked)
创建一组新的立方 B?zier 曲线。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | java.awt.geom.Point2D[] | 多个 B?bezier 段的控制点。 |
| isStroked | boolean | 指定路径此段的描边是否绘制。 |
Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.
createPolyLineSegment(Point2D[] points)
public XpsPolyLineSegment createPolyLineSegment(Point2D[] points)
创建一个包含任意数量单个顶点的新的描边多边形绘图。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | java.awt.geom.Point2D[] | 定义折线段的多个段的坐标集合。 |
Returns: XpsPolyLineSegment - New polygonal drawing segment.
createPolyLineSegment(Point2D[] points, boolean isStroked)
public XpsPolyLineSegment createPolyLineSegment(Point2D[] points, boolean isStroked)
创建一个包含任意数量单个顶点的新的多边形绘图。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | java.awt.geom.Point2D[] | 定义折线段的多个段的坐标集合。 |
| isStroked | boolean | 指定路径此段的描边是否绘制。 |
Returns: XpsPolyLineSegment - New polygonal drawing segment.
createPolyQuadraticBezierSegment(Point2D[] points)
public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points)
创建一组新的描边二次 B?zier 曲线,从路径图形中的前一点通过一组顶点,并使用指定的控制点。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | java.awt.geom.Point2D[] | 多个二次 B?bezier 段的控制点。 |
Returns: XpsPolyQuadraticBezierSegment - New quadratic B?zier curves segment.
createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)
public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)
创建一组新的二次 B?zier 曲线,从路径图形中的前一点通过一组顶点,并使用指定的控制点。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| points | java.awt.geom.Point2D[] | 多个二次 B?bezier 段的控制点。 |
| isStroked | boolean | 指定路径此段的描边是否绘制。 |
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)
创建一个新的径向渐变画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| center | java.awt.geom.Point2D | 径向渐变的中心点(即椭圆的中心)。 |
| gradientOrigin | java.awt.geom.Point2D | 径向渐变的起始点。 |
| radiusX | float | 定义径向渐变的椭圆在 x 维度上的半径。 |
| radiusY | float | 定义径向渐变的椭圆在 y 维度上的半径。 |
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)
创建一个新的径向渐变画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 渐变停止点 | java.util.List<com.aspose.xps.XpsGradientStop> | 渐变停止点的列表。 |
| center | java.awt.geom.Point2D | 径向渐变的中心点(即椭圆的中心)。 |
| gradientOrigin | java.awt.geom.Point2D | 径向渐变的起始点。 |
| radiusX | float | 定义径向渐变的椭圆在 x 维度上的半径。 |
| radiusY | float | 定义径向渐变的椭圆在 y 维度上的半径。 |
Returns: XpsRadialGradientBrush - New radial gradient brush.
createSolidColorBrush(XpsColor color)
public XpsSolidColorBrush createSolidColorBrush(XpsColor color)
创建一个新的纯色画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| color | XpsColor | 填充元素的颜色。 |
Returns: XpsSolidColorBrush - New solid color brush.
createSolidColorBrush(Color color)
public XpsSolidColorBrush createSolidColorBrush(Color color)
创建一个新的纯色画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| color | java.awt.Color | 填充元素的颜色。 |
Returns: XpsSolidColorBrush - New solid color brush.
createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)
public XpsVisualBrush createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)
创建一个新的可视画刷。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| element | XpsContentElement | 用于视觉刷子的 Visual 属性的 XPS 元素(Canvas、Path 或 Glyphs)。 |
| 视图框 | java.awt.geom.Rectangle2D | 画笔源内容的位置和尺寸。 |
| 视口 | java.awt.geom.Rectangle2D | 在包含坐标空间中,主画笔瓦片的区域(可能会重复)被用于填充画笔所应用的区域。 |
Returns: XpsVisualBrush - New visual brush.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getHeight()
public float getHeight()
返回页面的高度,以有效坐标空间的单位表示的实数。
Returns: float - 页面高度。
getPageCount()
public int getPageCount()
返回活动文档中的页数。
Returns: int - 活动文档中的页数。
getTotalPageCount()
public int getTotalPageCount()
返回 XPS 文档中所有文档的总页数。
Returns: int - XPS 文档中所有文档的总页数。
getUtils()
public DocumentUtils getUtils()
获取提供超出正式 XPS 操作 API 的实用功能的对象。
Returns: DocumentUtils - The object that provides utilities beyond the formal XPS manipulation API.
getWidth()
public float getWidth()
返回页面的宽度,以有效坐标空间的单位表示的实数。
Returns: float - 页面宽度。
hashCode()
public native int hashCode()
Returns: int
insertCanvas(int index)
public XpsCanvas insertCanvas(int index)
在页面的 index 位置插入一个新的画布。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| index | int | 应插入新 Canvas 的位置。 |
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)
在页面的 index 位置插入新的字形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| index | int | 应插入新 Glyphs 的位置。 |
| font | XpsFont | 字体资源。 |
| fontSize | float | 字体大小。 |
| originX | float | 字形原点 X 坐标。 |
| originY | float | 字形原点 Y 坐标。 |
| unicodeString | java.lang.String | 要打印的字符串。 |
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)
在页面的 index 位置插入新的字形。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| index | int | 应插入新 Glyphs 的位置。 |
| fontFamily | java.lang.String | 字体族。 |
| fontSize | float | 字体大小。 |
| fontStyle | XpsFontStyle | 字体样式。 |
| originX | float | 字形原点 X 坐标。 |
| originY | float | 字形原点 Y 坐标。 |
| unicodeString | java.lang.String | 要打印的字符串。 |
Returns: XpsGlyphs - Inserted glyphs.
insertPath(int index, XpsPathGeometry data)
public XpsPath insertPath(int index, XpsPathGeometry data)
在页面的 index 位置插入一个新的路径。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| index | int | 应插入新 Path 的位置。 |
| data | XpsPathGeometry | 路径的几何形状。 |
Returns: XpsPath - Inserted path.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
removeAt(int index)
public XpsContentElement removeAt(int index)
从页面的 index 位置移除一个元素。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| index | int | 应删除元素的位置。 |
Returns: XpsContentElement - Removed element.
setHeight(float value)
public void setHeight(float value)
设置页面的高度,以有效坐标空间的单位表示的实数。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | float | 页面的高度。 |
setWidth(float value)
public void setWidth(float value)
设置页面的宽度,以有效坐标空间的单位表示的实数。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | float | 页面的宽度。 |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long | |
| arg1 | int |