* Push a clip rectangle * 压入裁剪矩形
(rect: IRectangle)
| 121 | * 压入裁剪矩形 |
| 122 | */ |
| 123 | public pushClipRect(rect: IRectangle): void { |
| 124 | if (this._clipStack.length > 0) { |
| 125 | const current = this._clipStack[this._clipStack.length - 1]; |
| 126 | const intersected = this.intersectRects(current, rect); |
| 127 | this._clipStack.push(intersected); |
| 128 | } else { |
| 129 | this._clipStack.push({ ...rect }); |
| 130 | } |
| 131 | this.flushBatch(); |
| 132 | this._backend.setClipRect(this._clipStack[this._clipStack.length - 1]); |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Pop the current clip rectangle |
nothing calls this directly
no test coverage detected