# OHOS::TransformMap - [Overview](#section1211423715165635) - [Summary](#section827625912165635) - [Public Member Functions](#pub-methods) ## **Overview** **Related Modules:** [Graphic](Graphic.md) **Description:** Transforms a rectangle, including rotation and scaling. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions

Function

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.