mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-14 09:41:19 +00:00
Add some gfx::Region operators
This commit is contained in:
parent
6123885241
commit
bf9994387d
@ -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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user