Add some gfx::Region operators

This commit is contained in:
David Capello 2016-01-04 17:48:56 -03:00
parent 6123885241
commit bf9994387d

View File

@ -1,5 +1,5 @@
// Aseprite Gfx Library
// Copyright (C) 2001-2013, 2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -99,6 +99,11 @@ namespace gfx {
Rect operator[](int i);
const Rect operator[](int i) const;
Region& operator+=(const Region& b) { return createUnion(*this, b); }
Region& operator|=(const Region& b) { return createUnion(*this, b); }
Region& operator&=(const Region& b) { return createIntersection(*this, b); }
Region& operator-=(const Region& b) { return createSubtraction(*this, b); }
private:
mutable details::Region m_region;
};