diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/fx_basic_coords.cpp | 6 | ||||
-rw-r--r-- | core/fxcrt/fx_coordinates.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/fxcrt/fx_basic_coords.cpp b/core/fxcrt/fx_basic_coords.cpp index 0785c7821b..ea11acab6b 100644 --- a/core/fxcrt/fx_basic_coords.cpp +++ b/core/fxcrt/fx_basic_coords.cpp @@ -373,6 +373,12 @@ void CFX_Matrix::TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const { y = fy; } +CFX_PointF CFX_Matrix::Transform(const CFX_PointF& point) const { + CFX_PointF ret = point; + TransformPoint(ret.x, ret.y); + return ret; +} + void CFX_Matrix::TransformRect(CFX_RectF& rect) const { FX_FLOAT right = rect.right(), bottom = rect.bottom(); TransformRect(rect.left, right, bottom, rect.top); diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h index ae09cf341e..7e7ed5264c 100644 --- a/core/fxcrt/fx_coordinates.h +++ b/core/fxcrt/fx_coordinates.h @@ -647,6 +647,7 @@ class CFX_Matrix { FX_FLOAT TransformDistance(FX_FLOAT distance) const; void TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const; + CFX_PointF Transform(const CFX_PointF& point) const; void TransformRect(CFX_RectF& rect) const; void TransformRect(FX_FLOAT& left, |