mirror of
https://github.com/openharmony/graphic_utils.git
synced 2026-07-20 19:45:49 -04:00
@@ -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()));
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user