1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef C_INCLUDE_DRAWING_PIXEL_MAP_H
17 #define C_INCLUDE_DRAWING_PIXEL_MAP_H
18 
19 /**
20  * @addtogroup Drawing
21  * @{
22  *
23  * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
24  *
25  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
26  *
27  * @since 8
28  * @version 1.0
29  */
30 
31 /**
32  * @file drawing_pixel_map.h
33  *
34  * @brief Declares functions related to the <b>pixelmap</b> object in the drawing module.
35  *
36  * @since 12
37  * @version 1.0
38  */
39 
40 #include "drawing_types.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /**
47  * @brief Introduces the native pixel map information defined by image framework.
48  * @since 12
49  * @version 1.0
50  */
51 struct NativePixelMap_;
52 
53 /**
54  * @brief Introduces the native pixel map information defined by image framework.
55  * @since 12
56  * @version 1.0
57  */
58 struct OH_PixelmapNative;
59 
60 /**
61  * @brief Gets an <b>OH_Drawing_PixelMap</b> object.
62  *
63  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
64  * @param NativePixelMap_ Indicates a pointer to an native pixelmap supported by image framework.
65  * @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.
66  * @since 12
67  * @version 1.0
68  */
69 OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_*);
70 
71 /**
72  * @brief Gets an <b>OH_Drawing_PixelMap</b> object.
73  *
74  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
75  * @param OH_PixelmapNative Indicates a pointer to the <b>OH_PixelmapNative</b> object supported by image framework.
76  * @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.
77  * @since 12
78  * @version 1.0
79  */
80 OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative*);
81 
82 /**
83  * @brief Dissolves the relationship between <b>OH_Drawing_PixelMap</b> object and <b>NativePixelMap_</b> or
84           <b>OH_PixelmapNative</b> which is build by 'GetFrom' function.
85  *
86  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
87  * @param OH_Drawing_PixelMap Indicates a pointer to the <b>OH_Drawing_PixelMap</b>.
88  * @since 12
89  * @version 1.0
90  */
91 void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap*);
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 /** @} */
97 #endif
98