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

Method localToGlobal

packages/fairygui/src/core/GObject.ts:783–798  ·  view source on GitHub ↗

* Convert local point to global * 本地坐标转全局坐标

(ax: number = 0, ay: number = 0, outPoint?: Point)

Source from the content-addressed store, hash-verified

781 * 本地坐标转全局坐标
782 */
783 public localToGlobal(ax: number = 0, ay: number = 0, outPoint?: Point): Point {
784 if (this._pivotAsAnchor) {
785 ax += this._pivotX * this._width;
786 ay += this._pivotY * this._height;
787 }
788
789 outPoint = outPoint || new Point();
790 outPoint.x = ax;
791 outPoint.y = ay;
792
793 if (this._displayObject) {
794 return this._displayObject.localToGlobal(outPoint, outPoint);
795 }
796
797 return outPoint;
798 }
799
800 /**
801 * Convert global point to local

Callers 5

localToGlobalRectMethod · 0.95
showPopupMethod · 0.80
layoutModalWaitPaneMethod · 0.80
collectFGUIGizmosFunction · 0.80
collectFGUIVirtualNodesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected