drawing_pixel_map.h
Overview
This file declares the functions related to the pixel map in the drawing module.
File to include: <native_drawing/drawing_pixel_map.h>
Library: libnative_drawing.so
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Related module: Drawing
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| NativePixelMap_ | NativePixelMap_ | Defines a pixel map defined by the image framework. |
| OH_PixelmapNative | OH_PixelmapNative | Defines a pixel map defined by the image framework. |
Functions
| Name | Description |
|---|---|
| OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_* nativePixelMap) | Obtains the pixel map defined by this module from a pixel map defined by the image framework. |
| OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative* pixelmapNative) | Obtains the pixel map defined by this module from a pixel map defined by the image framework. |
| void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap* pixelMap) | Removes the relationship between a pixel map defined by this module and a pixel map defined by the image framework. The relationship is established by calling OH_Drawing_PixelMapGetFromNativePixelMap or OH_Drawing_PixelMapGetFromOhPixelMapNative. |
Function Description
OH_Drawing_PixelMapGetFromNativePixelMap()
OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_* nativePixelMap)
Description
Obtains the pixel map defined by this module from a pixel map defined by the image framework.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Parameters
| Name | Description |
|---|---|
| NativePixelMap_* nativePixelMap | Pointer to a NativePixelMap_ object, which is the pixel map defined by the image framework. |
Returns
| Type | Description |
|---|---|
| OH_Drawing_PixelMap* | Returns the pointer to an OH_Drawing_PixelMap object, which is the pixel map defined by this module. If NULL is returned, the creation fails. The possible failure cause is that NativePixelMap_ is NULL. |
OH_Drawing_PixelMapGetFromOhPixelMapNative()
OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative* pixelmapNative)
Description
Obtains the pixel map defined by this module from a pixel map defined by the image framework.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Parameters
| Name | Description |
|---|---|
| OH_PixelmapNative* pixelmapNative | Pointer to a OH_PixelmapNative object, which is the pixel map defined by the image framework. |
Returns
| Type | Description |
|---|---|
| OH_Drawing_PixelMap* | Returns the pointer to an OH_Drawing_PixelMap object, which is the pixel map defined by this module. If NULL is returned, the creation fails. The possible failure cause is that OH_PixelmapNative is NULL. |
OH_Drawing_PixelMapDissolve()
void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap* pixelMap)
Description
Removes the relationship between a pixel map defined by this module and a pixel map defined by the image framework. The relationship is established by calling OH_Drawing_PixelMapGetFromNativePixelMap or OH_Drawing_PixelMapGetFromOhPixelMapNative.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 12
Parameters
| Name | Description |
|---|---|
| OH_Drawing_PixelMap* pixelMap | Pointer to an OH_Drawing_PixelMap object. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-drawing-gpu-context-h
openharmony 鸿蒙 capi-drawing-nativepixelmap-
openharmony 鸿蒙 capi-nativevsync-oh-nativevsync-expectedraterange
openharmony 鸿蒙 capi-drawing-oh-drawing-brush
openharmony 鸿蒙 capi-drawing-oh-drawing-image-info
openharmony 鸿蒙 capi-drawing-text-linetypography-h
openharmony 鸿蒙 capi-oh-nativeimage-oh-nativeimage
openharmony 鸿蒙 capi-drawing-typeface-h