* Convert global rect to local * 全局矩形转本地矩形
(
ax: number = 0,
ay: number = 0,
aw: number = 0,
ah: number = 0,
outRect?: Rectangle
)
| 844 | * 全局矩形转本地矩形 |
| 845 | */ |
| 846 | public globalToLocalRect( |
| 847 | ax: number = 0, |
| 848 | ay: number = 0, |
| 849 | aw: number = 0, |
| 850 | ah: number = 0, |
| 851 | outRect?: Rectangle |
| 852 | ): Rectangle { |
| 853 | outRect = outRect || new Rectangle(); |
| 854 | const pt = this.globalToLocal(ax, ay); |
| 855 | outRect.x = pt.x; |
| 856 | outRect.y = pt.y; |
| 857 | const pt2 = this.globalToLocal(ax + aw, ay + ah); |
| 858 | outRect.width = pt2.x - outRect.x; |
| 859 | outRect.height = pt2.y - outRect.y; |
| 860 | return outRect; |
| 861 | } |
| 862 | |
| 863 | // Disposal | 销毁 |
| 864 |
nothing calls this directly
no test coverage detected