Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b82203a6 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

minor Rect.h cleanup

add getBounds(), getWidth(), getHeight(), width() and height()
are kept for backward compatibility.

Change-Id: I83837abf17dc2f8bded1beff73430e8c7d9bbdb3
parent b194ec92
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -65,15 +65,22 @@ public:
    }

    // rectangle's width
    inline int32_t width() const {
    inline int32_t getWidth() const {
        return right-left;
    }
    
    // rectangle's height
    inline int32_t height() const {
    inline int32_t getHeight() const {
        return bottom-top;
    }

    inline Rect getBounds() const {
        return Rect(right-left, bottom-top);
    }

    inline int32_t width() const { return getWidth(); }
    inline int32_t height() const { return getHeight(); }

    void setLeftTop(const Point& lt) {
        left = lt.x;
        top  = lt.y;