1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* automatically generated by rust-bindgen 0.69.4 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::drawing::types::*;
extern "C" {
/** @brief Creates an <b>OH_Drawing_Canvas</b> object.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@return Returns the pointer to the <b>OH_Drawing_Canvas</b> object created.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasCreate() -> *mut OH_Drawing_Canvas;
/** @brief Destroys an <b>OH_Drawing_Canvas</b> object and reclaims the memory occupied by the object.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasDestroy(arg1: *mut OH_Drawing_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
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasBind(arg1: *mut OH_Drawing_Canvas, arg2: *mut OH_Drawing_Bitmap);
/** @brief Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasAttachPen(arg1: *mut OH_Drawing_Canvas, arg2: *const OH_Drawing_Pen);
/** @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
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasDetachPen(arg1: *mut OH_Drawing_Canvas);
/** @brief Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasAttachBrush(
arg1: *mut OH_Drawing_Canvas,
arg2: *const OH_Drawing_Brush,
);
/** @brief Detaches the brush from a canvas so that the canvas will not use the style
and color of the brush to fill in a shape.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasDetachBrush(arg1: *mut OH_Drawing_Canvas);
/** @brief Saves the current canvas status (canvas matrix) to the top of the stack.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasSave(arg1: *mut OH_Drawing_Canvas);
/** @brief Restores the canvas status (canvas matrix) saved on the top of the stack.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasRestore(arg1: *mut OH_Drawing_Canvas);
/** @brief Draws a line segment.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@param x1 Indicates the x coordinate of the start point of the line segment.
@param y1 Indicates the y coordinate of the start point of the line segment.
@param x2 Indicates the x coordinate of the end point of the line segment.
@param y2 Indicates the y coordinate of the end point of the line segment.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasDrawLine(
arg1: *mut OH_Drawing_Canvas,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
);
/** @brief Draws a path.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasDrawPath(arg1: *mut OH_Drawing_Canvas, arg2: *const OH_Drawing_Path);
/** @brief Clears a canvas by using a specified color.
@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
@param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
@param color Indicates the color, which is a 32-bit (ARGB) variable.
@since 8
@version 1.0*/
pub fn OH_Drawing_CanvasClear(arg1: *mut OH_Drawing_Canvas, color: u32);
}