harmony 鸿蒙drawing_shader_effect.h
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
Types
Name | Description |
---|---|
typedef enum OH_Drawing_TileMode OH_Drawing_TileMode | Defines an enum for tile modes of the shader effect. |
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_ShaderEffectCreateColorShader (const uint32_t color) | Creates an OH_Drawing_ShaderEffect object with a single color. |
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_ShaderEffectCreateLinearGradientWithLocalMatrix (const OH_Drawing_Point2D *startPt, const OH_Drawing_Point2D *endPt, const uint32_t *colors, const float *pos, uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix *) | 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_ShaderEffectCreateRadialGradientWithLocalMatrix (const OH_Drawing_Point2D *centerPt, float radius, const uint32_t *colors, const float *pos, uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix *) | 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. A sweep gradient paints a gradient in a sweeping arc ranging from 0° to 360°. |
OH_Drawing_ShaderEffect * OH_Drawing_ShaderEffectCreateImageShader (OH_Drawing_Image *, OH_Drawing_TileMode tileX, OH_Drawing_TileMode tileY, const OH_Drawing_SamplingOptions *, const OH_Drawing_Matrix *) | Creates an OH_Drawing_ShaderEffect object for an image shader. You are advised not to use the API for the canvas of the capture type because it affects the performance. |
OH_Drawing_ShaderEffect * OH_Drawing_ShaderEffectCreateTwoPointConicalGradient (const OH_Drawing_Point2D *startPt, float startRadius, const OH_Drawing_Point2D *endPt, float endRadius, const uint32_t *colors, const float *pos, uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix *) | Creates an OH_Drawing_ShaderEffect object that generates a gradient between two given circles. |
void OH_Drawing_ShaderEffectDestroy (OH_Drawing_ShaderEffect *) | Destroys an OH_Drawing_ShaderEffect object and reclaims the memory occupied by the object. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙DisplaySoloist_ExpectedRateRange
harmony 鸿蒙NativeColorSpaceManager
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦