!87 UILabel组件支持旋转

Merge pull request !87 from wangtiantian/bug_label_r
This commit is contained in:
openharmony_ci
2021-08-09 02:43:14 +00:00
committed by Gitee
2 changed files with 12 additions and 2 deletions
+2 -2
View File
@@ -164,7 +164,7 @@ void TransformMap::UpdateMap()
} else if (imgPoint3.x_ > COORD_MAX) {
polygon_[i].x_ = COORD_MAX;
} else {
polygon_[i].x_ = imgPoint3.x_;
polygon_[i].x_ = MATH_ROUND(imgPoint3.x_);
}
if (imgPoint3.y_ < COORD_MIN) {
@@ -172,7 +172,7 @@ void TransformMap::UpdateMap()
} else if (imgPoint3.y_ > COORD_MAX) {
polygon_[i].y_ = COORD_MAX;
} else {
polygon_[i].y_ = imgPoint3.y_;
polygon_[i].y_ = MATH_ROUND(imgPoint3.y_);
}
}
Matrix3<float> translate = Matrix3<float>::Translate(Vector2<float>(rect_.GetX(), rect_.GetY()));
+10
View File
@@ -154,6 +154,16 @@ public:
return matrix_;
}
const Vector2<float>& GetRotatePivot() const
{
return rotatePivot_;
}
int16_t GetRotateAngle() const
{
return angle_;
}
/**
* @brief Rotates the rectangle.
* @param angle Indicates the angle to rotate.