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 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Left | double | 读写 | 获取或设置左侧。 |
Bottom | double | 读写 | 获取或设置底部。 |
Width | double | 读写 | 获取或设置宽度。 |
Height | double | 读写 | 获取或设置高度。 |
RoundedCornerRadius | double | 读写 | 用于圆角矩形渲染的角半径(0 = 锐角)。 |
GraphInfo | Aspose.Pdf.GraphInfo | 读写 | 获取或设置图形信息。 |
Text | Aspose.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) | 矩形是否完全位于以原点为锚点的容器中。 |