1 /* 2 * Copyright (c) 2021-2022 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_COLOR_H 17 #define C_INCLUDE_DRAWING_COLOR_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_color.h 33 * 34 * @brief Declares functions related to the <b>color</b> object in the drawing module. 35 * 36 * @kit ArkGraphics2D 37 * @library libnative_drawing.so 38 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 39 * @since 8 40 * @version 1.0 41 */ 42 43 #include "drawing_types.h" 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 49 /** 50 * @brief Converts four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color. 51 * 52 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 53 * @param alpha Indicates a variable that describes alpha. The value ranges from 0x00 to 0xFF. 54 * @param red Indicates a variable that describes red. The value ranges from 0x00 to 0xFF. 55 * @param green Indicates a variable that describes green. The value ranges from 0x00 to 0xFF. 56 * @param blue Indicates a variable that describes blue. The value ranges from 0x00 to 0xFF. 57 * @return Returns a 32-bit (ARGB) variable that describes the color. 58 * @since 8 59 * @version 1.0 60 */ 61 uint32_t OH_Drawing_ColorSetArgb(uint32_t alpha, uint32_t red, uint32_t green, uint32_t blue); 62 63 #ifdef __cplusplus 64 } 65 #endif 66 /** @} */ 67 #endif 68