oaPoint
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaPoint 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaPoint 当前在 oapy 中可用的 Python 接口。
详细说明
The oaPoint class specifies a location in a two-dimensional grid with 32-bit integer coordinates。 It is used to specify locations and extents for all classes derived from oaFig 。 An oaPoint is a utility object that is always constructed and destroyed by application code。 It can be used for purposes unrelated to OA databases。 A sequence of oaPoints is often specified with the oaPointArray class。
构造函数
_base.oaPoint()
obj = _base.oaPoint()
_base.oaPoint(xValIn, yValIn)
obj = _base.oaPoint(xValIn, yValIn)
_base.oaPoint(point, xform)
obj = _base.oaPoint(point, xform)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.x() |
| ✅ | obj.y() |
| ✅ | obj.x() |
| ✅ | obj.y() |
| ✅ | obj.set(x, y) |
| ✅ | obj.transform(xform, result) |
| ✅ | obj.transform(xform) |
| ✅ | obj.transform(scale, angle, result) |
| ✅ | obj.transform(scale, angle) |
| ✅ | obj.distanceFrom2(point) |
| ✅ | obj.operator+=(pt) |
| ✅ | obj.operator-=(pt) |
| ✅ | obj.operator-() |
| ✅ | obj.operator-(pt) |
| ✅ | obj.operator+(pt) |
| ✅ | obj.operator==(pt) |
| ✅ | obj.operator!=(pt) |
方法说明
obj.x()
绑定状态: 已绑定
Python 调用: obj.x()
This function returns the X value of this point。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.x()
obj.y()
绑定状态: 已绑定
Python 调用: obj.y()
This function returns the Y value of this point。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.y()
obj.x()
绑定状态: 已绑定
Python 调用: obj.x()
This function returns the reference of the X value of this point。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.x()
obj.y()
绑定状态: 已绑定
Python 调用: obj.y()
This function returns the reference of the Y value of this point。 friend class oaChecker < oaPoint > [friend]。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.y()
obj.set(x, y)
绑定状态: 已绑定
Python 调用: obj.set(x, y)
This function sets both coordinates of the point at once。
参数
x: x-coordinate。y: y-coordinate。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.set(x, y)
obj.transform(xform, result)
绑定状态: 已绑定
Python 调用: obj.transform(xform, result)
This function transforms this point by the specified scale factor and rotation angle。 The point is rotated about the origin。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.transform(xform, result)
obj.transform(xform)
绑定状态: 已绑定
Python 调用: obj.transform(xform)
This function transforms this point by the specified scale factor and rotation angle。 The point is rotated about the origin。 The result is stored in 'result', which can be the same point。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.transform(xform)
obj.transform(scale, angle, result)
绑定状态: 已绑定
Python 调用: obj.transform(scale, angle, result)
This function transforms a point by the specified transform value and replaces the original point with the result。
参数
xform: The transform value。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.transform(scale, angle, result)
obj.transform(scale, angle)
绑定状态: 已绑定
Python 调用: obj.transform(scale, angle)
This function transforms this point with the specified transform。 The result is stored in result, which can be the same point。
参数
xform: The transform value。result: The resulting transformation value。
返回
- The transformation value。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.transform(scale, angle)
obj.distanceFrom2(point)
绑定状态: 已绑定
Python 调用: obj.distanceFrom2(point)
This function returns the square of the distance from this point to the specified point。
参数
point: The reference point。
返回
- The square of the distance from this point to the specified point。
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.distanceFrom2(point)
obj.operator+=(pt)
绑定状态: 已绑定
Python 调用: obj.operator+=(pt)
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator+=(pt)
obj.operator-=(pt)
绑定状态: 已绑定
Python 调用: obj.operator-=(pt)
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator-=(pt)
obj.operator-()
绑定状态: 已绑定
Python 调用: obj.operator-()
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator-()
obj.operator-(pt)
绑定状态: 已绑定
Python 调用: obj.operator-(pt)
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator-(pt)
obj.operator+(pt)
绑定状态: 已绑定
Python 调用: obj.operator+(pt)
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator+(pt)
obj.operator==(pt)
绑定状态: 已绑定
Python 调用: obj.operator==(pt)
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator==(pt)
obj.operator!=(pt)
绑定状态: 已绑定
Python 调用: obj.operator!=(pt)
Python 示例
from oapy._oa import _base
# assume obj is a oaPoint
obj.operator!=(pt)