openharmony 鸿蒙 capi-drawing-color-h

2026-08-25 浏览 (1)

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

NameDescription
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

NameDescription
uint32_t alphaAlpha, which is a variable ranging from 0x00 to 0xFF.
uint32_t redRead, which is a variable ranging from 0x00 to 0xFF.
uint32_t greenGreen, which is a variable ranging from 0x00 to 0xFF.
uint32_t blueBlue, which is a variable ranging from 0x00 to 0xFF.

Return value

TypeDescription
uint32_tReturns 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

openharmony 鸿蒙 capi-drawing-brush-h

openharmony 鸿蒙 capi-nativewindow

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/k2KM30nA