Point 类
内容
[
隐藏
]Summary: Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
Module: aspose.imaging
Full Name: aspose.imaging.Point
Constructors
| Name | 描述 |
|---|---|
| Point() | 初始化 Point 类的新实例 |
| Point(dw) | 使用整数值指定的坐标初始化 Point 结构的新实例。 |
| Point(size) | 从 Size 结构初始化 Point 结构的新实例。 |
| Point(x, y) | 使用指定的坐标初始化 Point 结构的新实例。 |
Properties
| Name | Type | Access | 描述 |
|---|---|---|---|
| empty [static] | Point | r | 获取一个新的 Point 结构实例,其 Point.x 和 Point.y 值均为零。 |
| is_empty | bool | r | 获取一个值,指示此 Point 是否为空。 |
| x | int | r/w | 获取或设置此 Point 的 x 坐标。 |
| y | int | r/w | 获取或设置此 Point 的 y 坐标。 |
Methods
| Name | 描述 |
|---|---|
| add(point, size) | 将指定的 Size 添加到指定的 Point。 |
| ceiling(point) | 通过将指定的 PointF 的值四舍五入到更高的整数,将其转换为 Point。 |
| create_from_d_word(dw) | 使用整数值指定的坐标初始化 Point 结构的新实例。 |
| create_from_size(size) | 从 Size 结构初始化 Point 结构的新实例。 |
| from_long(packed_point, x, y) | 将打包在 long 对象中的 Point 对象解构为单独的 X 和 Y 整数值。 |
| offset(dx, dy) | 按指定的量平移此 Point。 |
| offset(point) | 按指定的 Point 平移此 Point。 |
| round(point) | 通过将 Point 的值四舍五入到最近的整数,将指定的 PointF 转换为 Point 对象。 |
| subtract(point, size) | 返回从指定的 Point 中减去指定的 Size 的结果。 |
| to_long() | 将此 Point 转换为单个 long 值,其中高位和低位分别包含 X 和 Y 坐标。 |
| truncate(point) | 通过截断 Point 的值,将指定的 PointF 转换为 Point。 |
Constructor: Point()
Point()
初始化 Point 类的新实例
Constructor: Point(dw)
Point(dw)
使用整数值指定的坐标初始化 Point 结构的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| dw | int | 一个 32 位整数,指定新点的坐标。 |
Constructor: Point(size)
Point(size)
Parameters:
| 参数 | Type | Description |
|---|---|---|
| size | Size | 包含新点坐标。 |
Constructor: Point(x, y)
Point(x, y)
使用指定的坐标初始化 Point 结构的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| x | int | 点的水平位置。 |
| y | int | 点的垂直位置。 |
Method: add(point, size) [static]
add(point, size)
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point | Point | 要添加到的 Point。 |
| size | Size | 要添加到 point 的 Size。 |
Returns
| Type | Description |
|---|---|
| Point | 加法运算结果的 Point。 |
Method: ceiling(point) [static]
ceiling(point)
通过将指定的 PointF 的值四舍五入到更高的整数,将其转换为 Point。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point | PointF | 用于转换的 PointF。 |
Returns
| Type | Description |
|---|---|
| Point | 此方法转换为的 Point。 |
Method: create_from_d_word(dw) [static]
create_from_d_word(dw)
使用整数值指定的坐标初始化 Point 结构的新实例。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| dw | int | 一个 32 位整数,指定新点的坐标。 |
Returns
| Type | Description |
|---|---|
| Point |
Method: create_from_size(size) [static]
create_from_size(size)
Parameters:
| 参数 | Type | Description |
|---|---|---|
| size | Size | 包含新点坐标。 |
Returns
| Type | Description |
|---|---|
| Point |
Method: from_long(packed_point, x, y) [static]
from_long(packed_point, x, y)
将打包在 long 对象中的 Point 对象解构为单独的 X 和 Y 整数值。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| packed_point | int | 已打包为一个长整数值的 Point 对象。 |
| x | int[] | 从打包的 Point 中提取的 X 值。 |
| y | int[] | 从打包的 Point 中提取的 Y 值。 |
Method: offset(dx, dy)
offset(dx, dy)
按指定的量平移此 Point。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| dx | int | 用于偏移 x 坐标的量。 |
| dy | int | 用于偏移 y 坐标的量。 |
Method: offset(point)
offset(point)
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point | Point | 用于偏移此 Point 的 Point。 |
Method: round(point) [static]
round(point)
通过将 Point 的值四舍五入到最近的整数,将指定的 PointF 转换为 Point 对象。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point | PointF | 用于转换的 PointF。 |
Returns
| Type | Description |
|---|---|
| Point | 此方法转换为的 Point。 |
Method: subtract(point, size) [static]
subtract(point, size)
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point | Point | 要从中减去的 Point。 |
| size | Size | 从 point 中减去的 Size。 |
Returns
| Type | Description |
|---|---|
| Point | 减法运算结果的 Point。 |
Method: to_long()
to_long()
将此 Point 转换为单个 long 值,其中高位和低位分别包含 X 和 Y 坐标。
Returns
| Type | Description |
|---|---|
| int | 已打包为一个长整数值的 Point 对象。 |
Method: truncate(point) [static]
truncate(point)
通过截断 Point 的值,将指定的 PointF 转换为 Point。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| point | PointF | 用于转换的 PointF。 |
Returns
| Type | Description |
|---|---|
| Point | 此方法转换为的 Point。 |