# OHOS::Polygon ## **Overview** **Related Modules:** [Graphic](Graphic.md) **Description:** Defines a polygon, including vertex coordinates and the maximum number of vertices \(defined by [MAX\_VERTEX\_NUM](Graphic.md#gafff78acb69e2b147b6f33d68e570ef54)\). **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions
Polygon () |
The default constructor used to create a Polygon instance. |
A constructor used to construct a Polygon instance based on a rectangle. |
|
Polygon (const Vector2< int16_t > *vertexes, const uint8_t vertexNum) |
A constructor used to create a Polygon instance based on the vertex coordinates and the number of coordinates. |
~Polygon () |
A destructor used to delete the Polygon instance. |
MakeAABB () const |
Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle. |
GetVertexNum () const |
|
SetVertexNum (uint8_t vertexNum) |
|
operator new (size_t size) |
|
operator delete (void *p) |
MAX_VERTEX_NUM = 8 |