diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index 6342ee2cabc59dc0554927f80d86c4c9d6e4c64b..e29361bf18e277e83a941c8c08f53647c1ceb680 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -1169,6 +1169,23 @@ export class FrameNode { * @since 20 */ isTransferred(): boolean; + + /** + * Converts a point's coordinates from the current node's coordinate system + * to the target node's coordinate system. + * + * @param { Position } position - The point's coordinates in the current node's local coordinate system. + * @param { FrameNode } targetNode - The destination node whose coordinate system will be used + * for conversion. + * @returns { Position } The converted coordinates in the target node's local coordinate system. + * @throws { BusinessError } 100024 - The current FrameNode and the target FrameNode do not have a common ancestor node. + * @throws { BusinessError } 100025 - The parameter is invalid. The error message provides specific details about which parameter is invalid and why, e.g., "The parameter 'targetNode' is invalid: it cannot be disposed". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + convertPoint(position: Position, targetNode: FrameNode): Position; } /** diff --git a/api/arkui/FrameNode.static.d.ets b/api/arkui/FrameNode.static.d.ets index 7d01d7afda754cfe509b3a602e31e70438b2ea14..faf66109fd41f93ffe4a446121cf13a5298abe1d 100644 --- a/api/arkui/FrameNode.static.d.ets +++ b/api/arkui/FrameNode.static.d.ets @@ -714,6 +714,21 @@ export declare class FrameNode { * @since 20 */ isTransferred(): boolean; + + /** + * Converts a point's coordinates from the current node's coordinate system + * to the target node's coordinate system. + * + * @param { Position } position - The point's coordinates in the current node's local coordinate system. + * @param { FrameNode } targetNode - The destination node whose coordinate system will be used + * for conversion. + * @returns { Position } The converted coordinates in the target node's local coordinate system. + * @throws { BusinessError } 100024 - The current FrameNode and the target FrameNode do not have a common ancestor node. + * @throws { BusinessError } 100025 - The parameter is invalid. The error message provides specific details about which parameter is invalid and why, e.g., "The parameter 'targetNode' is invalid: it cannot be disposed". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 22 + */ + convertPoint(position: Position, targetNode: FrameNode): Position; } /**