Defines enumerations related to ImageSpan, which are used to embed images in rich text and control the alignment between images and text. Multiple alignment modes are supported for mixed image-text layout scenarios, enabling precise alignment of images with text and improving the display of rich text.
File to include: <arkui/node_attributes/image_span.h>
Library: libace_ndk.z.so
System capability: SystemCapability.ArkUI.ArkUI.Full
Since: 12
Related module: ArkUI_NativeModule
Sample: native_type_sample
| Name | typedef Keyword | Description |
|---|---|---|
| ArkUI_ImageSpanAlignment | ArkUI_ImageSpanAlignment | Enumerates image alignment modes based on text. |
enum ArkUI_ImageSpanAlignment
Description
Enumerates image alignment modes based on text.
Since: 12
| Enum Value | Description |
|---|---|
| ARKUI_IMAGE_SPAN_ALIGNMENT_BASELINE = 0 | The image is bottom aligned with the text baseline. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_BOTTOM = 1 | The image is bottom aligned with the text. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_CENTER = 2 | The image is center aligned with the text. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_TOP = 3 | The image is top aligned with the text. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_FOLLOW_PARAGRAPH = 4 | The image alignment mode follows the text component's alignment mode. Since: 20 |