diff --git a/graphic/graphic_2d/native_drawing/drawing_matrix.h b/graphic/graphic_2d/native_drawing/drawing_matrix.h
index bbf6645dfaf5910f121f92fbe67eac5150aa0eb0..daae024ba891e8af105667e1cef58d13ebe0d318 100644
--- a/graphic/graphic_2d/native_drawing/drawing_matrix.h
+++ b/graphic/graphic_2d/native_drawing/drawing_matrix.h
@@ -161,6 +161,44 @@ typedef enum {
bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix* matrix, const OH_Drawing_Rect* src,
const OH_Drawing_Rect* dst, OH_Drawing_ScaleToFit stf);
+/**
+ * @brief Sets the transformation matrix to rotate around a specified point (px, py) using the given specified sine and
+ * cosine.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param sinValue Indicates the sine of the angle of rotation.
+ * @param cosValue Indicates the cosine of the angle of rotation.
+ * @param px Indicates the x-coordinate of the point around which to rotate.
+ * @param py Indicates the y-coordinate of the point around which to rotate.
+ * @return Returns an error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the cMatrix is nullptr.
+ *
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixSetSinCos(
+ OH_Drawing_Matrix* cMatrix, float sinValue, float cosValue, float px, float py);
+
+/**
+ * @brief Sets the transformation matrix to apply the given tilt factor (kx, ky) at the specified point (px, py).
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param kx Indicates the skew factor in the x direction.
+ * @param ky Indicates the skew factor in the y direction.
+ * @param px Indicates the x-coordinate of the point around which to skew.
+ * @param py Indicates the y-coordinate of the point around which to skew.
+ * @return Returns an error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the cMatrix is nullptr.
+ *
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixSetSkew(OH_Drawing_Matrix* cMatrix, float kx, float ky, float px, float py);
+
/**
* @brief Sets matrix to matrix multiplied by matrix constructed from rotating by degrees
* about pivot point(px, py), positive degrees rotates clockwise.
@@ -223,6 +261,87 @@ void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix* matrix, float degree, float p
*/
void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py);
+/**
+ * @brief Sets Matrix to Matrix multiplied by Matrix constructed from skewing by (kx, ky)
+ * about a pivot point at (px, py).
+ * Given:
+ *
+ * | A B C | | 1 kx dx |
+ * Matrix =| D E F |, K(kx, ky, px, py) = | ky 1 dy |
+ * | G H I | | 0 0 1 |
+ *
+ * where:
+ *
+ * dx = -kx * py
+ * dy = -ky * px
+ *
+ * sets Matrix to:
+ *
+ * | A B C | | 1 kx dx | | A+B*ky A*kx+B A*dx+B*dy+C |
+ * Matrix * K(kx, ky, px, py) = | D E F | | ky 1 dy | = | D+E*ky D*kx+E D*dx+E*dy+F |
+ * | G H I | | 0 0 1 | | G+H*ky G*kx+H G*dx+H*dy+I |
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param kx Horizontal skew factor.
+ * @param ky Vertical skew factor.
+ * @param px Pivot on x-axis.
+ * @param py Pivot on y-axis.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if matrix is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixPreSkew(OH_Drawing_Matrix* cMatrix, float kx, float ky, float px, float py);
+
+/**
+ * @brief Sets Matrix to Matrix constructed from skewing by (kx, ky) about pivot point
+ * (px, py), multiplied by Matrix.
+ * Given:
+ *
+ * | J K L | | 1 kx dx |
+ * Matrix =| M N O |, K(kx, ky, px, py) = | ky 1 dy |
+ * | P Q R | | 0 0 1 |
+ *
+ * where:
+ *
+ * dx = -kx * py
+ * dy = -ky * px
+ *
+ * sets Matrix to:
+ *
+ * | 1 kx dx| |J K L| |J+kx*M+dx*P K+kx*N+dx*Q L+kx*O+dx+R|
+ * K(kx, ky, px, py) * Matrix = |ky 1 dy| |M N O| = |ky*J+M+dy*P ky*K+N+dy*Q ky*L+O+dy*R|
+ * | 0 0 1| |P Q R| | P Q R|
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param kx Horizontal skew factor.
+ * @param ky Vertical skew factor.
+ * @param px Pivot on x-axis.
+ * @param py Pivot on y-axis.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixPostSkew(OH_Drawing_Matrix* cMatrix, float kx, float ky, float px, float py);
+
+/**
+ * @brief A circle with radius radius is constructed using the matrix mapping, and the average radius is returned.
+ * The result squared is equal to the major axis length times the minor axis length.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param radius Indicates the pointer to radius of a circle.
+ * @param radiusDst Average mapped radius.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if matrix or radiusDst is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixMapRadius(const OH_Drawing_Matrix* cMatrix, float radius, float* radiusDst);
+
/**
* @brief Sets forward matrix to translate by dx and dy.
* Given:
@@ -323,6 +442,22 @@ void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix* matrix, float sx, float sy, f
*/
void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix* matrix, float dx, float dy);
+/**
+ * @brief Determines whether a rectangle will be mapped to another rectangle after the specified matrix transformation.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param mapping Indicates a pointer to a boolean variable that will be set to true if the rectangle will map
+ * to another rectangle, or false otherwise.
+ * @return Returns an error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the cMatrix or mapping is nullptr.
+ *
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixRectStaysRect(const OH_Drawing_Matrix* cMatrix, bool* mapping);
+
/**
* @brief Reset matrix to identity, which has no effect on mapped point, sets matrix to:
* | 1 0 0 |
@@ -477,6 +612,22 @@ void OH_Drawing_MatrixMapPoints(const OH_Drawing_Matrix* matrix, const OH_Drawin
*/
bool OH_Drawing_MatrixMapRect(const OH_Drawing_Matrix* matrix, const OH_Drawing_Rect* src, OH_Drawing_Rect* dst);
+/**
+ * @brief Determines whether the specified transformation matrix is an affine transformation.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cMatrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @param affine Indicates a pointer to a boolean variable that will be set to true if the matrix is affine,
+ * or false otherwise.
+ * @return Returns an error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the cMatrix is or affine is nullptr.
+ *
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_MatrixIsAffine(const OH_Drawing_Matrix* cMatrix, bool* affine);
+
/**
* @brief Returns true if the first matrix equals the second matrix.
*
diff --git a/graphic/graphic_2d/native_drawing/drawing_point.h b/graphic/graphic_2d/native_drawing/drawing_point.h
index d3c8f5a46109bef056ca5279f887575386e2bb1e..ef066acadaff42df85b38346989eda9ce5661705 100644
--- a/graphic/graphic_2d/native_drawing/drawing_point.h
+++ b/graphic/graphic_2d/native_drawing/drawing_point.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -102,6 +102,65 @@ OH_Drawing_ErrorCode OH_Drawing_PointGetY(const OH_Drawing_Point* point, float*
*/
OH_Drawing_ErrorCode OH_Drawing_PointSet(OH_Drawing_Point* point, float x, float y);
+/**
+ * @brief Indicates whether firstPoint are equal to secondPoint.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param firstPoint Indicates the pointer to an OH_Drawing_Point object.
+ * @param secondPoint Indicates the pointer to an OH_Drawing_Point object.
+ * @param isEqual Indicates whether firstPoint and secondPoint are equal.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if firstPoint or secondPoint is nullptr,
+ * or isEqual is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_PointEquals(
+ const OH_Drawing_Point *firstPoint, const OH_Drawing_Point *secondPoint, bool *isEqual);
+
+/**
+ * @brief Offset the coordinates of the point.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param point Indicates the pointer to an OH_Drawing_Point object.
+ * @param x Indicates the x offset of the point.
+ * @param y Indicates the y offset of the point.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_PointOffset(OH_Drawing_Point* point, float x, float y);
+
+/**
+ * @brief Returns the euclidean distance from (0,0) to (x,y).
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param point Indicates the pointer to an OH_Drawing_Point object.
+ * @param len Indicates euclidean distance of the point.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point or len is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_PointLength(const OH_Drawing_Point* point, float* len);
+
+/**
+ * @brief Reverse the coordinates of a point.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param point Indicates the pointer to an OH_Drawing_Point object.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_PointNegate(OH_Drawing_Point* point);
+
/**
* @brief Destroys an OH_Drawing_Point object and reclaims the memory occupied by the object.
*
diff --git a/graphic/graphic_2d/native_drawing/drawing_rect.h b/graphic/graphic_2d/native_drawing/drawing_rect.h
index ce02692a20494f8e4f50c0a390e1d3ca354df60b..04e36f33c2672897b42ea601f1cb301bfb9faca0 100644
--- a/graphic/graphic_2d/native_drawing/drawing_rect.h
+++ b/graphic/graphic_2d/native_drawing/drawing_rect.h
@@ -73,6 +73,95 @@ OH_Drawing_Rect* OH_Drawing_RectCreate(float left, float top, float right, float
*/
bool OH_Drawing_RectIntersect(OH_Drawing_Rect* rect, const OH_Drawing_Rect* other);
+/**
+ * @brief Gets whether the rectangle is empty.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @param isEmpty Indicates the result of function.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rect or isEmpty is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RectIsEmpty(const OH_Drawing_Rect* rect, bool* isEmpty);
+
+/**
+* @brief Sets the dst integer Rect by rounding this rectangle's coordinates to their nearest integer values.
+*
+* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+* @param rect Indicates the pointer to an OH_Drawing_Rect object.
+* @return Returns the error code.
+* Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+* Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rect is nullptr.
+* @since 14
+* @version 1.0
+*/
+OH_Drawing_ErrorCode OH_Drawing_RectRound(OH_Drawing_Rect* rect);
+
+/**
+* @brief Sets the dst integer Rect by rounding "out" this rectangle,
+* choosing the floor of top and left, and the ceiling of right and bottom.
+*
+* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+* @param sRect Indicates the pointer to an OH_Drawing_Rect object.
+* @param dRect Indicates the pointer to an OH_Drawing_Rect object.
+* @return Returns the error code.
+* Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+* Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if sRect or dRect is nullptr.
+* @since 14
+* @version 1.0
+*/
+OH_Drawing_ErrorCode OH_Drawing_RectRoundOut(OH_Drawing_Rect* sRect, OH_Drawing_Rect* dRect);
+
+/**
+ * @brief Offsets the rectangle by adding dx to its left and right coordinates,
+ * and adding dy to its top and bottom coordinates.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @param dx Indicates the amount to add to the rectangle's left and right coordinates.
+ * @param dy Indicates the amount to add to the rectangle's top and bottom coordinates.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rect is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RectOffset(OH_Drawing_Rect* rect, float dx, float dy);
+
+/**
+ * @brief Swaps the rectangle left and right if the left is greater than right;
+ * and swaps the rectangle top and bottom if the top is greater than bottom.
+ * If the edges are already correct, then nothing is done.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rect is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RectSort(OH_Drawing_Rect* rect);
+
+/**
+ * @brief Equals the original rectangular object to the destination rectangular object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param src Indicates the pointer to an OH_Drawing_Rect object.
+ * @param dst Indicates the pointer to an OH_Drawing_Rect object.
+ * @param rectEquals Indicates if other object is rect object.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if src or dst is nullptr,
+ * or rectEquals is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RectEquals(OH_Drawing_Rect* src, OH_Drawing_Rect* dst, bool* rectEquals);
+
/**
* @brief Sets rect to the union of rect and other.
*
diff --git a/graphic/graphic_2d/native_drawing/drawing_region.h b/graphic/graphic_2d/native_drawing/drawing_region.h
index ea27f3bcef0a16ec05c722ade28d511fed68fdbf..e75e44617454305402b70b1a6bacbe12909a9fae 100644
--- a/graphic/graphic_2d/native_drawing/drawing_region.h
+++ b/graphic/graphic_2d/native_drawing/drawing_region.h
@@ -40,6 +40,7 @@
#ifndef C_INCLUDE_DRAWING_REGION_H
#define C_INCLUDE_DRAWING_REGION_H
+#include "drawing_error_code.h"
#include "drawing_types.h"
#ifdef __cplusplus
@@ -89,6 +90,178 @@ typedef enum {
*/
OH_Drawing_Region* OH_Drawing_RegionCreate(void);
+/**
+ * @brief Overriding the class Region equals operator.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param from Indicates source of comparison object.
+ * @param to Indicates comparison object.
+ * @param res Indicates whether the the two regions are equal.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of from, to or res is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionEquals(OH_Drawing_Region* from, OH_Drawing_Region* to, bool* res);
+
+/**
+ * @brief Determines whether the region contains the rect.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @param res Indicates whether the the region is equal contains the rect.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of region, rect or res is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionQuickContains(OH_Drawing_Region* region,
+ const OH_Drawing_Rect* rect, bool* res);
+
+/**
+ * @brief Determines whether two regions does not intersect.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param other Indicates the pointer to an OH_Drawing_Region object.
+ * @param res Indicates whether the rectangle does not intersect with the region.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of region, other or res is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionQuickRejectWithRegion(OH_Drawing_Region* region,
+ const OH_Drawing_Region* other, bool* res);
+
+/**
+ * @brief Determines if the area contains multiple rectangles.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param contain Indicates whether the region contains multiple rectangles.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of region or contain is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionIsComplex(const OH_Drawing_Region* region, bool* contain);
+
+/**
+ * @brief Determines whether region is empty.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cRegion Indicates the pointer to an OH_Drawing_Region object.
+ * @param isEmpty Indicates whether the region is empty.It is true if region is empty;
+ * it is false otherwise.
+ * @return Returns the error code {@link OH_Drawing_ErrorCode}.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if cRegion or isEmpty is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionIsEmpty(OH_Drawing_Region* cRegion, bool* isEmpty);
+
+/**
+ * @brief Combines regions and rect.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @param other Indicates the pointer to an OH_Drawing_Region object.
+ * @param op Indicates the operation to apply to combine.
+ * @param res Indicates whether the region is not empty.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of region, rect, other or res is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionOpWithRect(OH_Drawing_Region* region, const OH_Drawing_Rect* rect,
+ const OH_Drawing_Region* other, OH_Drawing_RegionOpMode op, bool* res);
+
+/**
+ * @brief Get the external rect with the smallest region.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if region or rect is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionGetBounds(OH_Drawing_Region* region, OH_Drawing_Rect* rect);
+
+/**
+ * @brief Determines whether rect and region does not intersect.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @param res Indicates whether the rectangle does not intersect with the region.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of region, rect or res is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionQuickReject(
+ const OH_Drawing_Region* region, const OH_Drawing_Rect* rect, bool* res);
+
+/**
+ * @brief Constructs a copy of an existing region.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cRegion Indicates the pointer to an OH_Drawing_Region object.
+ * @param cCopy Indicates the pointer to an OH_Drawing_Region object.
+ * @param isRegion Indicates whether the constructed region is empty.It is true if region is not empty;
+ * it is false otherwise.
+ * @return Returns the error code {@link OH_Drawing_ErrorCode}.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of cRegion, cCopy and isRegion is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionSetRegion(OH_Drawing_Region* cRegion, const OH_Drawing_Region* cCopy,
+ bool* isRegion);
+
+/**
+ * @brief Translates by dx along the x-axis and dy along the y-axis, and assign the result to the dst region.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param region Indicates the pointer to an OH_Drawing_Region object.
+ * @param dx Indicates the distance to translate on x-axis.
+ * @param dy Indicates the distance to translate on y-axis.
+ * @param dst Indicates the pointer to an OH_Drawing_Region object.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if region or dst is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionTranslate(OH_Drawing_Region* region,
+ int32_t dx, int32_t dy, OH_Drawing_Region* dst);
+
+/**
+ * @brief Determines whether the region is a rect with positive dimensional.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param cRegion Indicates the pointer to an OH_Drawing_Region object.
+ * @param isRect Indicates whether drawable area is a rect.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if cRegion or isRect is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_RegionIsRect(const OH_Drawing_Region* cRegion, bool* isRect);
+
/**
* @brief Determines whether the region contains the specified coordinates.
*
diff --git a/graphic/graphic_2d/native_drawing/drawing_typeface.h b/graphic/graphic_2d/native_drawing/drawing_typeface.h
index 0b5e8d965f6bb04fcb2bb7cca885b30d952d6f83..3c412e49d691acd02f9a5fa8f151d3ed1ad14ea4 100644
--- a/graphic/graphic_2d/native_drawing/drawing_typeface.h
+++ b/graphic/graphic_2d/native_drawing/drawing_typeface.h
@@ -172,6 +172,22 @@ OH_Drawing_ErrorCode OH_Drawing_FontArgumentsAddVariation(OH_Drawing_FontArgumen
*/
OH_Drawing_ErrorCode OH_Drawing_FontArgumentsDestroy(OH_Drawing_FontArguments* fontArguments);
+/**
+ * @brief Indicates whether two OH_Drawing_Typeface objects are equal.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param typeface Indicates the pointer to an OH_Drawing_Typeface object.
+ * @param other Indicates the pointer to an OH_Drawing_Typeface object.
+ * @param isEqual Indicates results.
+ * @return Returns the error code.
+ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.
+ * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of typeface, other and isEqual is nullptr.
+ * @since 14
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_TypefaceIsEqual(OH_Drawing_Typeface* typeface, OH_Drawing_Typeface* other,
+ bool* isEqual);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
index 82740916529eb02214fdb23d47dee984f6cd3c4d..3ac578d85fe2813ae9e996a290476aecba9768e8 100644
--- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
+++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
@@ -358,6 +358,122 @@
{ "name": "OH_Drawing_MatrixRotate" },
{ "name": "OH_Drawing_MatrixTranslate" },
{ "name": "OH_Drawing_MatrixScale" },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixSetSinCos"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixSetSkew"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixRectStaysRect"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixIsAffine"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixMapRadius"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixPreSkew"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_MatrixPostSkew"
+ },
+ {
+ "first_introduced": "14",
+ "name":"OH_Drawing_RectEquals"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_TypefaceIsEqual"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionEquals"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionQuickContains"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionQuickRejectWithRegion"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionOpWithRect"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionGetBounds"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionTranslate"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionSetRegion"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionIsRect"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionQuickReject"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionIsComplex"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RegionIsEmpty"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RectRound"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RectRoundOut"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RectOffset"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RectSort"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_RectIsEmpty"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_PointEquals"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_PointOffset"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_PointLength"
+ },
+ {
+ "first_introduced": "14",
+ "name": "OH_Drawing_PointNegate"
+ },
{
"first_introduced": "12",
"name": "OH_Drawing_MatrixSetPolyToPoly"