summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_coordinates.h')
-rw-r--r--core/fxcrt/fx_coordinates.h61
1 files changed, 8 insertions, 53 deletions
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index 9e41efc417..d01191da37 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -275,68 +275,23 @@ class CFX_FloatRect {
float Width() const { return right - left; }
float Height() const { return top - bottom; }
- void Inflate(float x, float y) {
- Normalize();
- left -= x;
- right += x;
- bottom -= y;
- top += y;
- }
-
+ void Inflate(float x, float y);
void Inflate(float other_left,
float other_bottom,
float other_right,
- float other_top) {
- Normalize();
- left -= other_left;
- bottom -= other_bottom;
- right += other_right;
- top += other_top;
- }
-
- void Inflate(const CFX_FloatRect& rt) {
- Inflate(rt.left, rt.bottom, rt.right, rt.top);
- }
-
- void Deflate(float x, float y) {
- Normalize();
- left += x;
- right -= x;
- bottom += y;
- top -= y;
- }
+ float other_top);
+ void Inflate(const CFX_FloatRect& rt);
+ void Deflate(float x, float y);
void Deflate(float other_left,
float other_bottom,
float other_right,
- float other_top) {
- Normalize();
- left += other_left;
- bottom += other_bottom;
- right -= other_right;
- top -= other_top;
- }
+ float other_top);
+ void Deflate(const CFX_FloatRect& rt);
- void Deflate(const CFX_FloatRect& rt) {
- Deflate(rt.left, rt.bottom, rt.right, rt.top);
- }
+ CFX_FloatRect GetDeflated(float x, float y) const;
- 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;
- top += f;
- bottom += f;
- }
+ void Translate(float e, float f);
void Scale(float fScale);
void ScaleFromCenterPoint(float fScale);