1 Star 0 Fork 4.9K

Cain / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
OHOS-Polygon.md 8.29 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

OHOS::Polygon

Overview

Related Modules:

Graphic

Description:

Defines a polygon, including vertex coordinates and the maximum number of vertices (defined by MAX_VERTEX_NUM).

Since:

1.0

Version:

1.0

Summary

Public Member Functions

Public Member Function Name

Description

Polygon ()

 

The default constructor used to create a Polygon instance.

Polygon (const Rect &rect)

 

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

Rect 

Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle.

GetVertexNum () const

uint8_t 

Obtains the number of vertices of the polygon.

SetVertexNum (uint8_t vertexNum)

void 

Sets the number of vertices of a polygon.

operator new (size_t size)

void * 

Overrides the new function.

operator delete (void *p)

void 

Overrides the delete function.

Static Public Attributes

Static Public Attribute Name

Description

MAX_VERTEX_NUM = 8

 
1
https://gitee.com/cain_qin/docs.git
git@gitee.com:cain_qin/docs.git
cain_qin
docs
docs
master

搜索帮助