MCPcopy Create free account
hub / github.com/esengine/esengine / pushClipRect

Method pushClipRect

packages/fairygui/src/render/RenderBridge.ts:123–133  ·  view source on GitHub ↗

* Push a clip rectangle * 压入裁剪矩形

(rect: IRectangle)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

intersectRectsMethod · 0.95
flushBatchMethod · 0.95
pushMethod · 0.65
setClipRectMethod · 0.65

Tested by

no test coverage detected