1# drawing_round_rect.h
2
3
4## Overview
5
6The **drawing_round_rect.h** file declares the functions related to the rounded rectangle in the drawing module.
7
8**File to include**: <native_drawing/drawing_round_rect.h>
9
10**Library**: libnative_drawing.so
11
12**Since**: 11
13
14**Related module**: [Drawing](_drawing.md)
15
16
17## Summary
18
19
20### Types
21
22| Name| Description|
23| -------- | -------- |
24| typedef enum [OH_Drawing_CornerPos](_drawing.md#oh_drawing_cornerpos)  [OH_Drawing_CornerPos](_drawing.md#oh_drawing_cornerpos) | Defines an enum for the corner positions of a rounded rectangle.|
25
26
27### Enums
28
29| Name| Description|
30| -------- | -------- |
31| [OH_Drawing_CornerPos](_drawing.md#oh_drawing_cornerpos) { CORNER_POS_TOP_LEFT, CORNER_POS_TOP_RIGHT, CORNER_POS_BOTTOM_RIGHT, CORNER_POS_BOTTOM_LEFT } | Enumerates the corner positions of a rounded rectangle.|
32
33
34### Functions
35
36| Name| Description|
37| -------- | -------- |
38| [OH_Drawing_RoundRect](_drawing.md#oh_drawing_roundrect) \* [OH_Drawing_RoundRectCreate](_drawing.md#oh_drawing_roundrectcreate) (const [OH_Drawing_Rect](_drawing.md#oh_drawing_rect) \*, float xRad, float yRad) | Creates an **OH_Drawing_RoundRect** object.|
39| void [OH_Drawing_RoundRectSetCorner](_drawing.md#oh_drawing_roundrectsetcorner) ([OH_Drawing_RoundRect](_drawing.md#oh_drawing_roundrect) \*, [OH_Drawing_CornerPos](_drawing.md#oh_drawing_cornerpos) pos, [OH_Drawing_Corner_Radii](_drawing.md#oh_drawing_corner_radii)) | Sets the radii of the specified rounded corner in a rounded rectangle.|
40| [OH_Drawing_Corner_Radii](_drawing.md#oh_drawing_corner_radii) [OH_Drawing_RoundRectGetCorner](_drawing.md#oh_drawing_roundrectgetcorner) ([OH_Drawing_RoundRect](_drawing.md#oh_drawing_roundrect) \*, [OH_Drawing_CornerPos](_drawing.md#oh_drawing_cornerpos) pos) | Obtains the radii of the specified rounded corner in a rounded rectangle.|
41| void [OH_Drawing_RoundRectDestroy](_drawing.md#oh_drawing_roundrectdestroy) ([OH_Drawing_RoundRect](_drawing.md#oh_drawing_roundrect) \*) | Destroys an **OH_Drawing_RoundRect** object and reclaims the memory occupied by the object.|
42| [OH_Drawing_ErrorCode](_drawing.md#oh_drawing_errorcode) [OH_Drawing_RoundRectOffset](_drawing.md#oh_drawing_roundrectoffset) ([OH_Drawing_RoundRect](_drawing.md#oh_drawing_roundrect) \*roundRect, float dx, float dy) | Translates a rounded rectangle by an offset along the X axis and Y axis.|
43