* Convert local rect to global * 本地矩形转全局矩形
(
ax: number = 0,
ay: number = 0,
aw: number = 0,
ah: number = 0,
outRect?: Rectangle
)
| 823 | * 本地矩形转全局矩形 |
| 824 | */ |
| 825 | public localToGlobalRect( |
| 826 | ax: number = 0, |
| 827 | ay: number = 0, |
| 828 | aw: number = 0, |
| 829 | ah: number = 0, |
| 830 | outRect?: Rectangle |
| 831 | ): Rectangle { |
| 832 | outRect = outRect || new Rectangle(); |
| 833 | const pt = this.localToGlobal(ax, ay); |
| 834 | outRect.x = pt.x; |
| 835 | outRect.y = pt.y; |
| 836 | const pt2 = this.localToGlobal(ax + aw, ay + ah); |
| 837 | outRect.width = pt2.x - outRect.x; |
| 838 | outRect.height = pt2.y - outRect.y; |
| 839 | return outRect; |
| 840 | } |
| 841 | |
| 842 | /** |
| 843 | * Convert global rect to local |
nothing calls this directly
no test coverage detected