drawing_shader_effect.h

Overview

The drawing_shader_effect.h file declares the functions related to the shader effect in the drawing module.

File to include: <native_drawing/drawing_shader_effect.h>

Library: libnative_drawing.so

Since: 11

Related module: Drawing

Summary

Enums

Name Description
OH_Drawing_TileMode {
CLAMP, REPEAT, MIRROR, DECAL
}
Enumerates the tile modes of the shader effect.

Functions

Name Description
OH_Drawing_ShaderEffect * OH_Drawing_ShaderEffectCreateLinearGradient (const OH_Drawing_Point *startPt, const OH_Drawing_Point *endPt, const uint32_t *colors, const float *pos, uint32_t size, OH_Drawing_TileMode) Creates an OH_Drawing_ShaderEffect object that generates a linear gradient between two points.
OH_Drawing_ShaderEffect * OH_Drawing_ShaderEffectCreateRadialGradient (const OH_Drawing_Point *centerPt, float radius, const uint32_t *colors, const float *pos, uint32_t size, OH_Drawing_TileMode) Creates an OH_Drawing_ShaderEffect object that generates a radial gradient based on the center and radius of a circle. The radial gradient transitions colors from the center to the ending shape in a radial manner.
OH_Drawing_ShaderEffect * OH_Drawing_ShaderEffectCreateSweepGradient (const OH_Drawing_Point *centerPt, const uint32_t *colors, const float *pos, uint32_t size, OH_Drawing_TileMode) Creates an OH_Drawing_ShaderEffect object that generates a sweep gradient based on the center.
void OH_Drawing_ShaderEffectDestroy (OH_Drawing_ShaderEffect *) Destroys an OH_Drawing_ShaderEffect object and reclaims the memory occupied by the object.