drawing_color.h
Overview
This file declares the functions related to the color in the drawing module.
File to include: <native_drawing/drawing_color.h>
Library: libnative_drawing.so
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 8
Related module: Drawing
Summary
Functions
| Name | Description |
|---|---|
| uint32_t OH_Drawing_ColorSetArgb(uint32_t alpha, uint32_t red, uint32_t green, uint32_t blue) | Converts four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color. |
Function Description
OH_Drawing_ColorSetArgb()
uint32_t OH_Drawing_ColorSetArgb(uint32_t alpha, uint32_t red, uint32_t green, uint32_t blue)
Description
Converts four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 8
Parameters
| Name | Description |
|---|---|
| uint32_t alpha | Alpha, which is a variable ranging from 0x00 to 0xFF. |
| uint32_t red | Read, which is a variable ranging from 0x00 to 0xFF. |
| uint32_t green | Green, which is a variable ranging from 0x00 to 0xFF. |
| uint32_t blue | Blue, which is a variable ranging from 0x00 to 0xFF. |
Return value
| Type | Description |
|---|---|
| uint32_t | Returns a 32-bit (ARGB) variable that describes the color. |
你可能感兴趣的鸿蒙文章
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