Class DocumentUtils

Class DocumentUtils

Namespace: Aspose.Page.XPS
Assembly: Aspose.Page.dll (25.1.2)

此类提供了超出正式 XPS 操作 API 的实用工具。

public class DocumentUtils

继承

objectDocumentUtils

继承成员

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

方法

CreateCircle(PointF, float)

创建一个表示圆的路径图形。

public XpsPathGeometry CreateCircle(PointF center, float radius)

参数

center PointF

圆的中心点。

radius float

圆的半径。

返回值

XpsPathGeometry

XPS 路径图形。

CreateCircularSegment(PointF, float, float, float)

创建一个表示两个角之间的圆形弧段的路径图形。

public XpsPathGeometry CreateCircularSegment(PointF center, float radius, float startAngle, float endAngle)

参数

center PointF

圆的中心。

radius float

圆的半径。

startAngle float

起始角度。

endAngle float

结束角度。

返回值

XpsPathGeometry

XPS 路径图形。

CreateEllipse(PointF, float, float)

创建一个表示椭圆的路径图形。

public XpsPathGeometry CreateEllipse(PointF center, float radiusX, float radiusY)

参数

center PointF

椭圆的中心点。

radiusX float

椭圆的水平半径。

radiusY float

椭圆的垂直半径。

返回值

XpsPathGeometry

XPS 路径图形。

CreateImage(string, RectangleF, ImageMode)

创建一个用图像填充的矩形路径。

public XpsPath CreateImage(string fileName, RectangleF imageBox, ImageMode mode = ImageMode.FitToBox)

参数

fileName string

图像文件的名称。

imageBox RectangleF

要用图像填充的图像框。

mode ImageMode

图像适配模式。

返回值

XpsPath

XPS 路径。

CreatePieSlice(PointF, float, float, float)

创建一个表示两个径向光线之间的圆形切片的路径图形。

public XpsPathGeometry CreatePieSlice(PointF center, float radius, float startAngle, float endAngle)

参数

center PointF

圆的中心。

radius float

圆的半径。

startAngle float

起始光线的角度。

endAngle float

结束光线的角度。

返回值

XpsPathGeometry

XPS 路径图形。

CreateRectangle(RectangleF)

创建一个表示矩形的路径图形。

public XpsPathGeometry CreateRectangle(RectangleF rectangle)

参数

rectangle RectangleF

矩形。

返回值

XpsPathGeometry

XPS 路径图形。

CreateRegularCircumscribedNGon(int, PointF, float)

创建一个表示围绕圆形的规则 n 边形的路径图形。

public XpsPathGeometry CreateRegularCircumscribedNGon(int n, PointF center, float radius)

参数

n int

顶点的数量。

center PointF

圆的中心。

radius float

圆的半径。

返回值

XpsPathGeometry

XPS 路径图形。

CreateRegularInscribedNGon(int, PointF, float)

创建一个表示内切于圆的规则 n 边形的路径图形。

public XpsPathGeometry CreateRegularInscribedNGon(int n, PointF center, float radius)

参数

n int

顶点的数量。

center PointF

圆的中心。

radius float

圆的半径。

返回值

XpsPathGeometry

XPS 路径图形。

 中文