diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcrt/fx_coordinates.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h index 79f7d4f29e..bcbdc0b804 100644 --- a/core/fxcrt/fx_coordinates.h +++ b/core/fxcrt/fx_coordinates.h @@ -543,6 +543,16 @@ class CFX_FloatRect { Deflate(rt.left, rt.bottom, rt.right, rt.top); } + CFX_FloatRect GetDeflated(float x, float y) const { + if (IsEmpty()) + return CFX_FloatRect(); + + CFX_FloatRect that = *this; + that.Deflate(x, y); + that.Normalize(); + return that; + } + void Translate(float e, float f) { left += e; right += e; |