• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /**
17  * @addtogroup Drawing
18  * @{
19  *
20  * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
21  *
22  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
23  *
24  * @since 8
25  * @version 1.0
26  */
27 
28 /**
29  * @file drawing_pixel_map.h
30  *
31  * @brief Declares functions related to the <b>pixelmap</b> object in the drawing module.
32  *
33  * @kit ArkGraphics2D
34  * @library libnative_drawing.so
35  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
36  * @since 12
37  * @version 1.0
38  */
39 
40 #ifndef C_INCLUDE_DRAWING_PIXEL_MAP_H
41 #define C_INCLUDE_DRAWING_PIXEL_MAP_H
42 
43 #include "drawing_types.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /**
50  * @brief Introduces the native pixel map information defined by image framework.
51  * @since 12
52  * @version 1.0
53  */
54 typedef struct NativePixelMap_ NativePixelMap_;
55 
56 /**
57  * @brief Introduces the native pixel map information defined by image framework.
58  * @since 12
59  * @version 1.0
60  */
61 typedef struct OH_PixelmapNative OH_PixelmapNative;
62 
63 /**
64  * @brief Gets an <b>OH_Drawing_PixelMap</b> object.
65  *
66  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
67  * @param nativePixelMap Indicates a pointer to an native pixelmap supported by image framework.
68  * @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.
69  * @since 12
70  * @version 1.0
71  */
72 OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_* nativePixelMap);
73 
74 /**
75  * @brief Gets an <b>OH_Drawing_PixelMap</b> object.
76  *
77  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
78  * @param pixelmapNative Indicates a pointer to the <b>OH_PixelmapNative</b> object supported by image framework.
79  * @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.
80  *         If nullptr is returned, the get operation fails.
81  *         The possible cause of the failure is that a nullptr is passed.
82  * @since 12
83  * @version 1.0
84  */
85 OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative* pixelmapNative);
86 
87 /**
88  * @brief Dissolves the relationship between <b>OH_Drawing_PixelMap</b> object and <b>NativePixelMap_</b> or
89           <b>OH_PixelmapNative</b> which is build by 'GetFrom' function.
90  *
91  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
92  * @param pixelMap Indicates a pointer to the <b>OH_Drawing_PixelMap</b>.
93  * @since 12
94  * @version 1.0
95  */
96 void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap* pixelMap);
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 /** @} */
102 #endif
103