harmony 鸿蒙@ohos.arkui.node
@ohos.arkui.node
The Node module provides level-2 module APIs of custom nodes to export and use.
BuilderNode module: provides APIs for creating a BuilderNode – a custom node that can be used to mount native components. Avoid mounting a BuilderNode as a child node to other custom nodes.
FrameNode module: provides APIs for a FrameNode, which represents an entity node in the component tree. It can be used by a NodeController to mount a BuilderNode (that holds the FrameNode) to a NodeContainer or mount a RenderNode to another FrameNode.
NodeController module: provides APIs for managing custom nodes, such as creating, showing, and updating custom nodes, and APIs for mounting custom nodes to a NodeContainer component.
Graphics module: provides APIs for defining attributes of a custom node.
RenderNode module: provides APIs for creating a RenderNode in custom drawing settings with C APIs.
XComponentNode module: provides APIs a XComponentNode, an XComponent in the component tree. You can write EGL/OpenGL ES and media data and display it on the XComponent, whose rendering type can be dynamically modified.
NOTE
The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Custom nodes are not available in DevEco Studio Previewer.
Obtaining UI Context
To obtain the UI context, use any of the following methods:
Call getUIContext() in ohos.window to obtain the **UIContext **instance.
Call the built-in method getUIContext() of the custom component.
Use the makeNode callback of NodeController.
Modules to Import
import {
BuilderNode,
NodeController,
FrameNode,
RenderNode,
XComponentNode,
NodeRenderType,
RenderOptions,
DrawContext,
Size,
Offset,
Position,
Pivot,
Scale,
Translation,
Matrix4,
Rotation,
Frame
} from '@kit.ArkUI';
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent
harmony 鸿蒙ARKUI_TextPickerRangeContent
harmony 鸿蒙ArkUI_AnimateCompleteCallback
harmony 鸿蒙ArkUI_ContextCallback
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦