1 Star 0 Fork 4.9K

Lin_bruin / docs

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

OHOS::TransformMap

Overview

Related Modules:

Graphic

Description:

Transforms a rectangle, including rotation and scaling.

Since:

1.0

Version:

1.0

Summary

Public Member Functions

Public Member Function Name

Description

TransformMap ()

 

The default constructor used to create a TransformMap instance.

TransformMap (const Rect &rect)

 

A constructor used to create a TransformMap instance.

~TransformMap ()

 

A destructor used to delete the TransformMap instance.

GetClockWise () const

bool 

Checks whether the vertex coordinates of a polygon are clockwise.

SetPolygon (const Polygon &polygon)

void 

Sets a polygon after rectangle transformation.

GetPolygon () const

Polygon 

Obtains the polygon after rectangle transformation.

GetPivot () const

Point 

Obtains the pivot for the rotation or scaling operation.

IsInvalid () const

bool 

Checks whether the TransformMap instance is invalid. When the vertices are all 0, the TransformMap is invalid.

GetBoxRect () const

Rect 

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

Rotate (int16_t angle, const Vector2< int16_t > &pivot)

void 

Rotates the rectangle.

Scale (const Vector2< float > scale, const Vector2< int16_t > &pivot)

void 

Scales the rectangle.

operator new (size_t size)

void * 

Overrides the new function.

operator delete (void *p)

void 

Overrides the delete function.

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

搜索帮助