summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_coordinates.cpp')
-rw-r--r--core/fxcrt/fx_coordinates.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index 136ae72527..fe62d01ebe 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -148,6 +148,13 @@ void CFX_FloatRect::UpdateRect(const CFX_PointF& point) {
top = std::max(top, point.y);
}
+void CFX_FloatRect::Scale(float fScale) {
+ left *= fScale;
+ bottom *= fScale;
+ right *= fScale;
+ top *= fScale;
+}
+
void CFX_FloatRect::ScaleFromCenterPoint(float fScale) {
float fHalfWidth = (right - left) / 2.0f;
float fHalfHeight = (top - bottom) / 2.0f;