[DEBUG] correct viewer
This commit is contained in:
parent
024d00adff
commit
7965135796
@ -99,9 +99,14 @@ egami::Image::~Image() {
|
||||
|
||||
}
|
||||
|
||||
egami::Image::Image(const ivec2& _size, enum colorType _type) :
|
||||
egami::Image::Image(const ivec2& _size,
|
||||
enum colorType _type,
|
||||
const void* _dataToCopy) :
|
||||
m_data(nullptr) {
|
||||
configure(_size, _type);
|
||||
if (_dataToCopy != nullptr) {
|
||||
memcpy(getTextureDataPointer(), _dataToCopy, getSize().x()*getSize().y()*egami::getFormatColorSize(getType()));
|
||||
}
|
||||
}
|
||||
|
||||
void egami::Image::swap(egami::Image& _obj) {
|
||||
|
@ -82,7 +82,8 @@ namespace egami {
|
||||
Image(const egami::Image& _image);
|
||||
Image& operator=(const egami::Image& _image);
|
||||
Image(const ivec2& _size,
|
||||
enum colorType _type = egami::colorType::undefined);
|
||||
enum colorType _type = egami::colorType::undefined,
|
||||
const void* _dataToCopy = nullptr);
|
||||
~Image();
|
||||
// TODO : IMplement move operator ... and copy operator...
|
||||
public:
|
||||
|
@ -74,7 +74,7 @@ bool appl::MainWindows::onEventEntry(const ewol::event::Entry& _event) {
|
||||
return true;
|
||||
}
|
||||
m_image->propertySource.set(m_listImages[m_idDisplayed]);
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::to_string(m_listImages.size()));
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::toString(m_listImages.size()));
|
||||
return true;
|
||||
}
|
||||
if (_event.getType() == gale::key::keyboard::left) {
|
||||
@ -84,7 +84,7 @@ bool appl::MainWindows::onEventEntry(const ewol::event::Entry& _event) {
|
||||
return true;
|
||||
}
|
||||
m_image->propertySource.set(m_listImages[m_idDisplayed]);
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::to_string(m_listImages.size()));
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::toString(m_listImages.size()));
|
||||
return true;
|
||||
}
|
||||
if (_event.getType() == gale::key::keyboard::down) {
|
||||
@ -93,7 +93,7 @@ bool appl::MainWindows::onEventEntry(const ewol::event::Entry& _event) {
|
||||
m_idDisplayed = m_listImages.size()-1;
|
||||
}
|
||||
m_image->propertySource.set(m_listImages[m_idDisplayed]);
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::to_string(m_listImages.size()));
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::toString(m_listImages.size()));
|
||||
return true;
|
||||
}
|
||||
if (_event.getType() == gale::key::keyboard::up) {
|
||||
@ -102,19 +102,19 @@ bool appl::MainWindows::onEventEntry(const ewol::event::Entry& _event) {
|
||||
m_idDisplayed = 0;
|
||||
}
|
||||
m_image->propertySource.set(m_listImages[m_idDisplayed]);
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::to_string(m_listImages.size()));
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::toString(m_listImages.size()));
|
||||
return true;
|
||||
}
|
||||
if (_event.getType() == gale::key::keyboard::pageDown) {
|
||||
m_idDisplayed = m_listImages.size()-1;
|
||||
m_image->propertySource.set(m_listImages[m_idDisplayed]);
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::to_string(m_listImages.size()));
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::toString(m_listImages.size()));
|
||||
return true;
|
||||
}
|
||||
if (_event.getType() == gale::key::keyboard::pageUp) {
|
||||
m_idDisplayed = 0;
|
||||
m_image->propertySource.set(m_listImages[m_idDisplayed]);
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::to_string(m_listImages.size()));
|
||||
propertyTitle.set("EVI:" + m_listImages[m_idDisplayed] + " " + etk::toString(m_idDisplayed+1) + "/" + etk::toString(m_listImages.size()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user