lottie/vector: added isEmpty() api in size class. 02/186302/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Thu, 9 Aug 2018 00:51:43 +0000 (09:51 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Thu, 9 Aug 2018 00:51:43 +0000 (09:51 +0900)
Change-Id: Ia49254b2d83c047d268ff7510c058c6b25873564

src/vector/vpoint.h

index 3c94ab0..fea5603 100644 (file)
@@ -142,6 +142,7 @@ class VSize {
 public:
     constexpr inline VSize() noexcept : mw(0), mh(0) {}
     constexpr inline VSize(int w, int h) noexcept : mw(w), mh(h) {}
+    bool isEmpty() const {return (mw <= 0 || mh <= 0);}
     constexpr inline int  width() const noexcept { return mw; }
     constexpr inline int  height() const noexcept { return mh; }
     inline void           setWidth(int w) { mw = w; }