From 614b623a2bec6c0f752e31875fc46ecbf6d49651 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Fri, 4 Aug 2017 17:26:15 +0200 Subject: [PATCH] [kandinsky] KDRect::topLeft and bottomRight Change-Id: I47e726cea81ea5bfb29409c5679c47dc1aae8f13 --- kandinsky/include/kandinsky/rect.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kandinsky/include/kandinsky/rect.h b/kandinsky/include/kandinsky/rect.h index 3d6bba6b4..2e6b879c4 100644 --- a/kandinsky/include/kandinsky/rect.h +++ b/kandinsky/include/kandinsky/rect.h @@ -26,6 +26,9 @@ public: KDCoordinate bottom() const { return m_y+m_height; } KDCoordinate left() const { return m_x; } + KDPoint topLeft() const { return KDPoint(left(), top()); } + KDPoint bottomRight() const { return KDPoint(right(), bottom()); } + bool operator ==(const KDRect &other) const { return (m_x == other.m_x && m_y == other.m_y && m_width == other.m_width && m_height == other.m_height);