!1719 新增effectkit BlurWithTileMode接口

Merge pull request !1719 from 肖邵安/master
This commit is contained in:
openharmony_ci 2024-11-15 04:09:51 +00:00 committed by Gitee
commit e5c945c729
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 33 additions and 0 deletions

View File

@ -77,6 +77,20 @@ EffectErrorCode OH_Filter_Release(OH_Filter* filter);
*/
EffectErrorCode OH_Filter_Blur(OH_Filter* filter, float radius);
/**
* @brief Creates a blur effect and then add to the filter.
*
* @syscap SystemCapability.Multimedia.Image.Core
* @param filter The OH_Filter pointer will be operated.
* @param radius The radius of the blur effect.
* @param tileMode The tileMode of the blur effect.
* @return BlurWithTileMode result code.
* {@link EFFECT_SUCCESS} if the operation is successful.
* {@link EFFECT_BAD_PARAMETER} if parameter is invalid.
* @since 14
*/
EffectErrorCode OH_Filter_BlurWithTileMode(OH_Filter* filter, float radius, EffectTileMode tileMode);
/**
* @brief Creates a brighten effect and then add to the filter.
*

View File

@ -88,6 +88,24 @@ typedef enum {
EFFECT_UNKNOWN_ERROR = 7600901,
} EffectErrorCode;
/**
* @brief Defines a effect filter tile mode.
*
* @since 14
*/
typedef enum {
/** Replicate the edge color if the shader draws outside of its original bounds */
CLAMP = 0,
/** Repeat the shader's image horizontally and vertically */
REPEAT,
/** Repeat the shader's image horizontally and vertically,
* alternating mirror images so that adjacent images always seam
*/
MIRROR,
/** Only draw within the original domain, return transparent-black everywhere else */
DECAL,
} EffectTileMode;
#ifdef __cplusplus
}
#endif

View File

@ -2,6 +2,7 @@
{ "name": "OH_Filter_CreateEffect" },
{ "name": "OH_Filter_Release" },
{ "name": "OH_Filter_Blur" },
{ "name": "OH_Filter_BlurWithTileMode" },
{ "name": "OH_Filter_Brighten" },
{ "name": "OH_Filter_GrayScale" },
{ "name": "OH_Filter_Invert" },