首页 / design / oaRect

oaRect

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaRectoapy 中可用,可通过 _design 模块访问。

本页汇总 oaRect 当前在 oapy 中可用的 Python 接口。

详细说明

The oaRect class implements a rectangle shape。

方法总览

状态 Python 调用
obj.setBBox(bBox)
obj.convertToPolygon()
_design.oaRect.create(block, layerNum, purposeNum, bBox)

方法说明

obj.setBBox(bBox)

绑定状态: 已绑定

Python 调用: obj.setBBox(bBox)

This function sets the bounding box of this rectangle to the specified value。 The new bBox is checked to verify it does not have zero area and is not inverted。

参数

  • bBox: The oaBox that is set to this oaRect object。

异常

  • oacRectBBoxInvalid

Python 示例

from oapy._oa import _design

# assume obj is a oaRect
obj.setBBox(bBox)

obj.convertToPolygon()

绑定状态: 已绑定

Python 调用: obj.convertToPolygon()

This function converts this rectangle into a polygon。 The new polygon is returned as the same pointer as this rectangle。

Python 示例

from oapy._oa import _design

# assume obj is a oaRect
obj.convertToPolygon()

_design.oaRect.create(block, layerNum, purposeNum, bBox)

绑定状态: 已绑定

Python 调用: _design.oaRect.create(block, layerNum, purposeNum, bBox)

This function creates a rectangle with the specified attributes。 The specified bBox is checked to verify it does not have zero area and it is not inverted。

参数

  • block: The block in which to create the rectangle。
  • layerNum: The number of the layer on which to create the rectangle。
  • purposeNum: The number of the layer purpose to use to create the rectangle。
  • bBox: The bounding box that sets this rectangle。

异常

  • oacRectBBoxInvalid

Python 示例

from oapy._oa import _design

_design.oaRect.create(block, layerNum, purposeNum, bBox)