From 5becb9a4be8f6e18b102de4eafe902284e9faded Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 1 Feb 2015 18:03:31 +0100 Subject: [PATCH] Add a new image size mode (nothing here uses it though). Also add Bounds.Expand --- math/geom2d.h | 3 +++ ui/view.h | 1 + 2 files changed, 4 insertions(+) diff --git a/math/geom2d.h b/math/geom2d.h index 0a94a42b8c..15f2f99501 100644 --- a/math/geom2d.h +++ b/math/geom2d.h @@ -59,6 +59,9 @@ struct Bounds { Point Center() const { return Point(centerX(), centerY()); } + Bounds Expand(float amount) const { + return Bounds(x - amount, y - amount, w + amount * 2, h + amount * 2); + } float x; float y; diff --git a/ui/view.h b/ui/view.h index 85ce4ce457..5910ea5a1c 100644 --- a/ui/view.h +++ b/ui/view.h @@ -701,6 +701,7 @@ private: enum ImageSizeMode { IS_DEFAULT, + IS_FIXED, }; class ImageView : public InertView {