[DEV] add swap in image
This commit is contained in:
parent
927604ad6d
commit
25e6b83253
@ -56,6 +56,12 @@ egami::Image::Image(const ivec2& _size, enum colorType _type) :
|
||||
configure(_size, _type);
|
||||
}
|
||||
|
||||
void egami::Image::swap(egami::Image& _obj) {
|
||||
ememory::SharedPtr<ImagePrivate> tmp = m_data;
|
||||
m_data = _obj.m_data;
|
||||
_obj.m_data = tmp;
|
||||
}
|
||||
|
||||
void egami::Image::configure(const ivec2& _size, enum colorType _type) {
|
||||
switch (_type) {
|
||||
case egami::colorType::undefined:
|
||||
|
@ -85,6 +85,7 @@ namespace egami {
|
||||
bool exist() {
|
||||
return m_data != nullptr;
|
||||
}
|
||||
void swap(egami::Image& _obj);
|
||||
// -----------------------------------------------
|
||||
// -- basic tools :
|
||||
// -----------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user