Rectangle

概述

Rectangle 是 Aspose.PDF FOSS 中用于 .NET 的一个类。继承自:Shape。

Drawing 命名空间中的矩形形状(区别于 Aspose.Pdf.Rectangle,后者是页面矩形)。

此类提供了 3 个用于在 .NET 程序中处理 Rectangle 对象的方法。可用的方法包括:CheckBounds、Rectangle。在安装了 Aspose.PDF FOSS for .NET 包之后,所有公共成员对任何 .NET 应用程序均可访问。属性包括:Bottom、GraphInfo、Height、Left、RoundedCornerRadius、Text,以及另外 1 项。

属性

名称类型访问描述
Leftdouble读写获取或设置左侧。
Bottomdouble读写获取或设置底部。
Widthdouble读写获取或设置宽度。
Heightdouble读写获取或设置高度。
RoundedCornerRadiusdouble读写用于圆角矩形渲染的角半径(0 = 锐角)。
GraphInfoAspose.Pdf.GraphInfo读写获取或设置图形信息。
TextAspose.Pdf.Text.TextFragment?读写随形状渲染的可选文本标签。

方法

签名描述
Rectangle(left: double, bottom: double, width: double, height: double)在此 Rectangle 实例上调用 Rectangle(left, bottom, width, height)。
Rectangle(left: float, bottom: float, width: float, height: float)匹配公共 API 的单精度重载。
CheckBounds(containerWidth: double, containerHeight: double)矩形是否完全位于以原点为锚点的容器中。

另请参阅

 中文