diff --git a/graphic/graphic_2d/native_drawing/drawing_bitmap.h b/graphic/graphic_2d/native_drawing/drawing_bitmap.h index 89f5fcdca540ef1bc34de4f9b60375f14d863e63..2540c24fb7a9c9d012ea20e75785e636adfa0072 100644 --- a/graphic/graphic_2d/native_drawing/drawing_bitmap.h +++ b/graphic/graphic_2d/native_drawing/drawing_bitmap.h @@ -139,6 +139,17 @@ uint32_t OH_Drawing_BitmapGetHeight(OH_Drawing_Bitmap*); */ void* OH_Drawing_BitmapGetPixels(OH_Drawing_Bitmap*); +/** + * @brief Gets the image info. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object. + * @param OH_Drawing_Image_Info Indicates the pointer to an OH_Drawing_Image_Info object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap*, OH_Drawing_Image_Info*); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_matrix.h b/graphic/graphic_2d/native_drawing/drawing_matrix.h index 89548745b1c9551a2dd74abe0d24edc579cd039e..1a1bc0255d3aa91b50b53880699fe9613e1dc029 100644 --- a/graphic/graphic_2d/native_drawing/drawing_matrix.h +++ b/graphic/graphic_2d/native_drawing/drawing_matrix.h @@ -199,6 +199,22 @@ void OH_Drawing_MatrixScale(OH_Drawing_Matrix*, float sx, float sy, float px, fl */ bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix*, OH_Drawing_Matrix* inverse); +/** + * @brief Sets the params of matrix to map src to dst. + * Count must greater than or equal to zero, and less than or equal to four. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object. + * @param src Points to map from. + * @param dst Points to map to. + * @param count Number of point in src and dst. + * @return Returns true if matrix is constructed successfully. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_MatrixSetPolyToPoly(OH_Drawing_Matrix*, const OH_Drawing_Point2D* src, + const OH_Drawing_Point2D* dst, uint32_t count); + /** * @brief Returns true if the first matrix equals the second matrix. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index e916a8a3fe59e3b9ff8f3a1adf56ffaae4afd58c..481d2580926e8c2b4856e24e433d371e48ec2e10 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -5,6 +5,10 @@ { "name": "OH_Drawing_BitmapCreateFromPixels" }, { "name": "OH_Drawing_BitmapGetWidth" }, { "name": "OH_Drawing_BitmapGetHeight" }, + { + "first_introduced": "12", + "name": "OH_Drawing_BitmapGetImageInfo" + }, { "name": "OH_Drawing_BitmapGetPixels" }, { "name": "OH_Drawing_BrushCreate" }, { "name": "OH_Drawing_BrushDestroy" }, @@ -90,6 +94,10 @@ { "name": "OH_Drawing_MatrixRotate" }, { "name": "OH_Drawing_MatrixTranslate" }, { "name": "OH_Drawing_MatrixScale" }, + { + "first_introduced": "12", + "name": "OH_Drawing_MatrixSetPolyToPoly" + }, { "name": "OH_Drawing_MatrixInvert" }, { "name": "OH_Drawing_MatrixIsEqual" }, { "name": "OH_Drawing_MatrixIsIdentity" },