diff --git a/graphic/graphic_2d/native_drawing/BUILD.gn b/graphic/graphic_2d/native_drawing/BUILD.gn
index 44f9f3218dcef5fc46550c6f659ff930ec0a5591..da26bf197000d6ec0ee0931093465f8e018e8397 100644
--- a/graphic/graphic_2d/native_drawing/BUILD.gn
+++ b/graphic/graphic_2d/native_drawing/BUILD.gn
@@ -25,6 +25,7 @@ ohos_ndk_headers("native_drawing_header") {
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_filter.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font_collection.h",
+ "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_image.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_mask_filter.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_matrix.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_path.h",
@@ -33,6 +34,7 @@ ohos_ndk_headers("native_drawing_header") {
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_rect.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_register_font.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_round_rect.h",
+ "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_sampling_options.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_shader_effect.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_blob.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_text_declaration.h",
@@ -64,6 +66,8 @@ ohos_ndk_library("libnative_drawing_ndk") {
"native_drawing/drawing_rect.h",
"native_drawing/drawing_register_font.h",
"native_drawing/drawing_round_rect.h",
+ "native_drawing/drawing_image.h",
+ "native_drawing/drawing_sampling_options.h",
"native_drawing/drawing_shader_effect.h",
"native_drawing/drawing_text_blob.h",
"native_drawing/drawing_text_declaration.h",
diff --git a/graphic/graphic_2d/native_drawing/drawing_brush.h b/graphic/graphic_2d/native_drawing/drawing_brush.h
index 215a3ee3966e91b31b21204c161577cf408682de..dca333f2de58b6036da66f0ff346a9ebaf34202f 100644
--- a/graphic/graphic_2d/native_drawing/drawing_brush.h
+++ b/graphic/graphic_2d/native_drawing/drawing_brush.h
@@ -21,7 +21,7 @@
* @{
*
* @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
- *
+ *
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
*
* @since 8
@@ -81,7 +81,7 @@ bool OH_Drawing_BrushIsAntiAlias(const OH_Drawing_Brush*);
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
* @param OH_Drawing_Brush Indicates the pointer to an OH_Drawing_Brush object.
- * @param bool Specifies whether to enable anti-aliasing. The value true means
+ * @param bool Specifies whether to enable anti-aliasing. The value true means
* to enable anti-aliasing, and false means the opposite.
* @since 8
* @version 1.0
@@ -154,6 +154,17 @@ void OH_Drawing_BrushSetShaderEffect(OH_Drawing_Brush*, OH_Drawing_ShaderEffect*
*/
void OH_Drawing_BrushSetFilter(OH_Drawing_Brush*, OH_Drawing_Filter*);
+/**
+ * @brief Sets a blender that implements the specified blendmode enum for a brush.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Brush object.
+ * @param OH_Drawing_BlendMode Indicates the blend mode.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_BrushSetBlendMode(OH_Drawing_Brush*, OH_Drawing_BlendMode);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h
index cc37815899750dae0d247397f59ebc3db6e23256..46b4cb7131777857ea8ab8d30413535ecaa52891 100644
--- a/graphic/graphic_2d/native_drawing/drawing_canvas.h
+++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h
@@ -21,7 +21,7 @@
* @{
*
* @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
- *
+ *
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
*
* @since 8
@@ -64,7 +64,7 @@ OH_Drawing_Canvas* OH_Drawing_CanvasCreate(void);
void OH_Drawing_CanvasDestroy(OH_Drawing_Canvas*);
/**
- * @brief Binds a bitmap to a canvas so that the content drawn on the canvas
+ * @brief Binds a bitmap to a canvas so that the content drawn on the canvas
* is output to the bitmap (this process is called CPU rendering).
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@@ -87,7 +87,7 @@ void OH_Drawing_CanvasBind(OH_Drawing_Canvas*, OH_Drawing_Bitmap*);
void OH_Drawing_CanvasAttachPen(OH_Drawing_Canvas*, const OH_Drawing_Pen*);
/**
- * @brief Detaches the pen from a canvas so that the canvas will not use the style
+ * @brief Detaches the pen from a canvas so that the canvas will not use the style
* and color of the pen to outline a shape.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@@ -272,7 +272,7 @@ void OH_Drawing_CanvasDrawTextBlob(OH_Drawing_Canvas*, const OH_Drawing_TextBlob
/**
* @brief Enumerates clip op.
- *
+ *
* @since 11
* @version 1.0
*/
@@ -363,6 +363,63 @@ void OH_Drawing_CanvasScale(OH_Drawing_Canvas*, float sx, float sy);
*/
void OH_Drawing_CanvasClear(OH_Drawing_Canvas*, uint32_t color);
+/**
+ * @brief Sets matrix of canvas.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_CanvasSetMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*);
+
+/**
+ * @brief Draws the specified source rectangle of the image onto the canvas,
+ * scaled and translated to the destination rectangle.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object.
+ * @param OH_Drawing_Rect Indicates the pointer to an OH_Drawing_Rect object.
+ * @param OH_Drawing_SamplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_CanvasDrawImageRect(OH_Drawing_Canvas*, OH_Drawing_Image*,
+ OH_Drawing_Rect* dst, OH_Drawing_SamplingOptions*);
+
+/**
+ * @brief Read pixels data from canvas.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @param OH_Drawing_Image_Info width, height, colorType, and alphaType of dstPixels.
+ * @param dstPixels destination pixel storage.
+ * @param dstRowBytes size of one row of pixels.
+ * @param srcX offset into canvas writable pixels on x-axis.
+ * @param srcY offset into canvas writable pixels on y-axis.
+ * @return true if pixels are copied to dstPixels.
+ * @since 12
+ * @version 1.0
+ */
+bool OH_Drawing_CanvasReadPixels(OH_Drawing_Canvas*, OH_Drawing_Image_Info*,
+ void* dstPixels, uint32_t dstRowBytes, int32_t srcX, int32_t srcY);
+
+/**
+ * @brief Read pixels data to a bitmap from canvas.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object.
+ * @param srcX offset into canvas writable pixels on x-axis.
+ * @param srcY offset into canvas writable pixels on y-axis.
+ * @return true if pixels are copied to dstBitmap.
+ * @since 12
+ * @version 1.0
+ */
+bool OH_Drawing_CanvasReadPixelsToBitmap(OH_Drawing_Canvas*, OH_Drawing_Bitmap*, int32_t srcX, int32_t srcY);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h
index 5c02a704d0b24f8fc6aaa4051878280e0643edea..4b3b1aaa5b79ddbeff7e108cc72cef9c6c7885f7 100644
--- a/graphic/graphic_2d/native_drawing/drawing_font.h
+++ b/graphic/graphic_2d/native_drawing/drawing_font.h
@@ -118,6 +118,38 @@ void OH_Drawing_FontSetFakeBoldText(OH_Drawing_Font*, bool isFakeBoldText);
*/
void OH_Drawing_FontDestroy(OH_Drawing_Font*);
+/**
+ * @brief Defines a run, supplies storage for the metrics of an SkFont.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef struct {
+ /** storage for top in font metrics */
+ float top;
+ /** storage for ascent in font metrics */
+ float ascent;
+ /** storage for descent in font metrics */
+ float descent;
+ /** storage for bottom in font metrics */
+ float bottom;
+ /** storage for leading in font metrics */
+ float leading;
+} OH_Drawing_Font_Metrics;
+
+/**
+ * @brief Obtains the metrics of a font.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Font Indicates the pointer to an OH_Drawing_Font object.
+ * @param OH_Drawing_Font_Metrics Indicates the pointer to an OH_Drawing_Font_Metrics object.
+ * @return Returns a float variable that recommended spacing between lines.
+ * Returns -1 if OH_Drawing_Font or OH_Drawing_Font_Metrics is nullptr.
+ * @since 12
+ * @version 1.0
+ */
+float OH_Drawing_FontGetMetrics(OH_Drawing_Font*, OH_Drawing_Font_Metrics*);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_image.h b/graphic/graphic_2d/native_drawing/drawing_image.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed2f1f4914cc0deb31957b99d3f4697ab851c061
--- /dev/null
+++ b/graphic/graphic_2d/native_drawing/drawing_image.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2021-2022 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef C_INCLUDE_DRAWING_IMAGE_H
+#define C_INCLUDE_DRAWING_IMAGE_H
+
+/**
+ * @addtogroup Drawing
+ * @{
+ *
+ * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+/**
+ * @file drawing_image.h
+ *
+ * @brief Declares functions related to the image object in the drawing module.
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+#include "drawing_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Creates an OH_Drawing_Image object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @return Returns the pointer to the OH_Drawing_Image object created.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_Image* OH_Drawing_ImageCreate(void);
+
+/**
+ * @brief Destroys an OH_Drawing_Image object and reclaims the memory occupied by the object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_ImageDestroy(OH_Drawing_Image*);
+
+/**
+ * @brief Rebuilds an OH_Drawing_Image object, sharing or copying bitmap pixels.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object.
+ * @param OH_Drawing_Bitmap Indicates the pointer to an OH_Drawing_Bitmap object.
+ * @return Returns true if successed.
+ * @since 12
+ * @version 1.0
+ */
+bool OH_Drawing_ImageBuildFromBitmap(OH_Drawing_Image*, OH_Drawing_Bitmap*);
+
+/**
+ * @brief Gets pixel count in each row of image.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object.
+ * @return Returns the width.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_Drawing_ImageGetWidth(OH_Drawing_Image*);
+
+/**
+ * @brief Gets pixel row count of image.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object.
+ * @return Returns the height.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_Drawing_ImageGetHeight(OH_Drawing_Image*);
+
+/**
+ * @brief Gets the image info.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Image Indicates the pointer to an OH_Drawing_Image object.
+ * @param OH_Drawing_Image_Info Indicates the pointer to an OH_Drawing_Image_Info object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_ImageGetImageInfo(OH_Drawing_Image*, OH_Drawing_Image_Info*);
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_drawing/drawing_pen.h b/graphic/graphic_2d/native_drawing/drawing_pen.h
index 220e5723d12d8ede702f020b1c2dd9c2efd2ecea..e94fcb24b91c04ed2254c09365ac5a66ec81be4e 100644
--- a/graphic/graphic_2d/native_drawing/drawing_pen.h
+++ b/graphic/graphic_2d/native_drawing/drawing_pen.h
@@ -21,7 +21,7 @@
* @{
*
* @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
- *
+ *
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
*
* @since 8
@@ -183,9 +183,9 @@ float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen*);
void OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen*, float miter);
/**
- * @brief Enumerates line cap styles of a pen. The line cap style defines
+ * @brief Enumerates line cap styles of a pen. The line cap style defines
* the style of both ends of a line segment drawn by the pen.
- *
+ *
* @since 8
* @version 1.0
*/
@@ -231,7 +231,7 @@ void OH_Drawing_PenSetCap(OH_Drawing_Pen*, OH_Drawing_PenLineCapStyle);
/**
* @brief Enumerates pen line join styles. The line join style defines
* the shape of the joints of a polyline segment drawn by the pen.
- *
+ *
* @since 8
* @version 1.0
*/
@@ -291,6 +291,17 @@ void OH_Drawing_PenSetShaderEffect(OH_Drawing_Pen*, OH_Drawing_ShaderEffect*);
*/
void OH_Drawing_PenSetFilter(OH_Drawing_Pen*, OH_Drawing_Filter*);
+/**
+ * @brief Sets a blender that implements the specified blendmode enum for a pen.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Pen Indicates the pointer to an OH_Drawing_Pen object.
+ * @param OH_Drawing_BlendMode Indicates the blend mode.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_PenSetBlendMode(OH_Drawing_Pen*, OH_Drawing_BlendMode);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h
new file mode 100644
index 0000000000000000000000000000000000000000..d29649408b93d0dc8f84d1b438ead95876b22826
--- /dev/null
+++ b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2021-2022 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H
+#define C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H
+
+/**
+ * @addtogroup Drawing
+ * @{
+ *
+ * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+/**
+ * @file drawing_sampling_options.h
+ *
+ * @brief Declares functions related to the sampling options object in the drawing module.
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+#include "drawing_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Enumerates storage filter mode.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef enum {
+ /** single sample point (nearest neighbor) */
+ FILTER_MODE_NEAREST,
+ /** interporate between 2x2 sample points (bilinear interpolation) */
+ FILTER_MODE_LINEAR,
+} OH_Drawing_FilterMode;
+
+/**
+ * @brief Enumerates storage formats mipmap mode.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef enum {
+ /** ignore mipmap levels, sample from the "base" */
+ MIPMAP_MODE_NONE,
+ /** sample from the nearest level */
+ MIPMAP_MODE_NEAREST,
+ /** interpolate between the two nearest levels */
+ MIPMAP_MODE_LINEAR,
+} OH_Drawing_MipmapMode;
+
+/**
+ * @brief Creates an OH_Drawing_SamplingOptions object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_FilterMode sampling filter mode.
+ * @param OH_Drawing_MipmapMode sampling mipmap mode..
+ * @return Returns the pointer to the OH_Drawing_SamplingOptions object created.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_SamplingOptions* OH_Drawing_SamplingOptionsCreate(OH_Drawing_FilterMode, OH_Drawing_MipmapMode);
+
+/**
+ * @brief Destroys an OH_Drawing_SamplingOptions object and reclaims the memory occupied by the object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_SamplingOptions Indicates the pointer to an OH_Drawing_SamplingOptions object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_SamplingOptionsDestroy(OH_Drawing_SamplingOptions*);
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h
index cdf7f35cc7738dc86e91aa114147e4e10c70f3ef..7709f5c4a9272937dd8c1c7c57914f5f44c6f5ed 100644
--- a/graphic/graphic_2d/native_drawing/drawing_types.h
+++ b/graphic/graphic_2d/native_drawing/drawing_types.h
@@ -21,7 +21,7 @@
* @{
*
* @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
- *
+ *
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
*
* @since 8
@@ -173,6 +173,22 @@ typedef struct OH_Drawing_Typeface OH_Drawing_Typeface;
*/
typedef struct OH_Drawing_TextBlob OH_Drawing_TextBlob;
+/**
+ * @brief Defines a image, which is used to describe a two dimensional array of pixels to draw.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_Drawing_Image OH_Drawing_Image;
+
+/**
+ * @brief Defines a sampling options, which is used to describe the sampling mode.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_Drawing_SamplingOptions OH_Drawing_SamplingOptions;
+
/**
* @brief Defines a textBlobBuilder, which is used to build the textBlob.
*
@@ -311,6 +327,23 @@ typedef enum {
BLEND_MODE_LUMINOSITY,
} OH_Drawing_BlendMode;
+/**
+ * @brief Defines image info struct.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef struct {
+ /** storage for width of image */
+ int32_t width;
+ /** storage for height of image */
+ int32_t height;
+ /** storage for color formats */
+ OH_Drawing_ColorFormat colorType;
+ /** storage for alpha formats */
+ OH_Drawing_AlphaFormat alphaType;
+} OH_Drawing_Image_Info;
+
#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 314e98b4190bd230729f7e365372eca4559d92d7..f7185128d5a8f78cbcdd606176b2c22e707a2030 100644
--- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
+++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
@@ -9,6 +9,7 @@
{ "name": "OH_Drawing_BrushDestroy" },
{ "name": "OH_Drawing_BrushGetAlpha" },
{ "name": "OH_Drawing_BrushSetAlpha" },
+ { "name": "OH_Drawing_BrushSetBlendMode" },
{ "name": "OH_Drawing_BrushIsAntiAlias" },
{ "name": "OH_Drawing_BrushSetAntiAlias" },
{ "name": "OH_Drawing_BrushGetColor" },
@@ -41,6 +42,10 @@
{ "name": "OH_Drawing_CanvasTranslate" },
{ "name": "OH_Drawing_CanvasScale" },
{ "name": "OH_Drawing_CanvasClear" },
+ { "name": "OH_Drawing_CanvasSetMatrix" },
+ { "name": "OH_Drawing_CanvasDrawImageRect" },
+ { "name": "OH_Drawing_CanvasReadPixels" },
+ { "name": "OH_Drawing_CanvasReadPixelsToBitmap" },
{ "name": "OH_Drawing_ColorFilterCreateBlendMode" },
{ "name": "OH_Drawing_ColorFilterCreateCompose" },
{ "name": "OH_Drawing_ColorFilterCreateLinearToSrgbGamma" },
@@ -59,6 +64,7 @@
{ "name": "OH_Drawing_FontSetTextSize" },
{ "name": "OH_Drawing_FontSetTextSkewX" },
{ "name": "OH_Drawing_FontSetTypeface" },
+ { "name": "OH_Drawing_FontGetMetrics" },
{ "name": "OH_Drawing_MaskFilterCreateBlur" },
{ "name": "OH_Drawing_MaskFilterDestroy" },
{ "name": "OH_Drawing_MatrixCreate" },
@@ -77,6 +83,7 @@
{ "name": "OH_Drawing_PenDestroy" },
{ "name": "OH_Drawing_PenGetAlpha" },
{ "name": "OH_Drawing_PenSetAlpha" },
+ { "name": "OH_Drawing_PenSetBlendMode" },
{ "name": "OH_Drawing_PenIsAntiAlias" },
{ "name": "OH_Drawing_PenSetAntiAlias" },
{ "name": "OH_Drawing_PenGetColor" },
@@ -144,6 +151,14 @@
{ "name": "OH_Drawing_TypographyGetMaxIntrinsicWidth" },
{ "name": "OH_Drawing_TypographyGetAlphabeticBaseline" },
{ "name": "OH_Drawing_TypographyGetIdeographicBaseline" },
+ { "name": "OH_Drawing_ImageCreate" },
+ { "name": "OH_Drawing_ImageDestroy" },
+ { "name": "OH_Drawing_ImageBuildFromBitmap" },
+ { "name": "OH_Drawing_ImageGetWidth" },
+ { "name": "OH_Drawing_ImageGetHeight" },
+ { "name": "OH_Drawing_ImageGetImageInfo" },
+ { "name": "OH_Drawing_SamplingOptionsCreate" },
+ { "name": "OH_Drawing_SamplingOptionsDestroy" },
{
"first_introduced": "11",
"name": "OH_Drawing_TypographyHandlerAddPlaceholder"