(self, c_handle: Optional[MaaRectHandle] = None)
| 542 | _own: bool |
| 543 | |
| 544 | def __init__(self, c_handle: Optional[MaaRectHandle] = None): |
| 545 | self._set_api_properties() |
| 546 | |
| 547 | if c_handle: |
| 548 | self._handle = c_handle |
| 549 | self._own = False |
| 550 | else: |
| 551 | self._handle = Library.framework().MaaRectCreate() |
| 552 | self._own = True |
| 553 | |
| 554 | if not self._handle: |
| 555 | raise RuntimeError("Failed to create rect buffer.") |
| 556 | |
| 557 | def __del__(self): |
| 558 | if self._handle and self._own: |
nothing calls this directly
no test coverage detected