diff --git a/graphic/graphic_2d/native_drawing/drawing_image_filter.h b/graphic/graphic_2d/native_drawing/drawing_image_filter.h index d77292aa373122d42569a029b9ca7dc448cefae1..de26fd58e2a1525561fbeca04c5bad2609d48d0a 100644 --- a/graphic/graphic_2d/native_drawing/drawing_image_filter.h +++ b/graphic/graphic_2d/native_drawing/drawing_image_filter.h @@ -78,6 +78,45 @@ OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sig */ OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromColorFilter(OH_Drawing_ColorFilter*, OH_Drawing_ImageFilter*); +/** + * @brief Creates an OH_Drawing_ImageFilter object that applies the bitmap to the input. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param cBitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @return Returns the pointer to the OH_Drawing_ImageFilter object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromBitmap(const OH_Drawing_Bitmap* cBitmap); + +/** + * @brief Creates an OH_Drawing_ImageFilter object that applies the bitmap with rect to the input. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param cBitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param cSrcRect Indicates the pointer to a src rect object. + * @param cDstRect Indicates the pointer to a dst rect object. + * @return Returns the pointer to the OH_Drawing_ImageFilter object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromBitmapWithRect( + const OH_Drawing_Bitmap* cBitmap, const OH_Drawing_Rect* cSrcRect, const OH_Drawing_Rect* cDstRect); + +/** + * @brief Creates an OH_Drawing_ImageFilter object that applies the blend to the input. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param cBlendMode Indicates the pointer to an OH_Drawing_BlendMode object. + * @param cBackground Indicates the background filter. + * @param cForeground Indicates the foreground filter. + * @return Returns the pointer to the OH_Drawing_ImageFilter object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromBlend( + OH_Drawing_BlendMode* cBlendMode, OH_Drawing_ImageFilter* cBackground, OH_Drawing_ImageFilter* cForeground); + /** * @brief Destroys an OH_Drawing_ImageFilter object and reclaims the memory occupied by the object. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 353ce3f539771d30cdac90947de31c81c38d3c4d..53eeda779d8eca62e308c7c7bdea17e5b88180c8 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -298,6 +298,18 @@ "first_introduced": "12", "name": "OH_Drawing_ImageFilterCreateBlur" }, + { + "first_introduced": "14", + "name": "OH_Drawing_ImageFilterCreateFromBitmap" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_ImageFilterCreateFromBitmapWithRect" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_ImageFilterCreateFromBlend" + }, { "first_introduced": "12", "name": "OH_Drawing_ImageFilterCreateFromColorFilter"