From 40caf6163ff2e1274d71146c207fbde0c099b089 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 11 Apr 2012 21:14:59 +0200 Subject: menu/clipping_helper: made clipping working --- src/utils/rectangle.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/utils/rectangle.hpp') diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp index b1e67ba8..95f1a7b4 100644 --- a/src/utils/rectangle.hpp +++ b/src/utils/rectangle.hpp @@ -95,6 +95,13 @@ namespace usdx return Math::min(point1.get_y(), point2.get_y()); } + void set_top(T value) + { + T height = get_height(); + point1.set_y(value); + point2.set_y(value + height); + } + const T get_bottom(void) const { return Math::max(point1.get_y(), point2.get_y()); -- cgit v1.2.3