6 return std::async(std::launch::async, [fname,
this]() ->
void {
12 const vector<RGBAcolor>& inPixels = msp.
sp->getPixelData();
13 unsigned rowSize = msp.
sp->getRowSize();
15 vector<RGBAcolor> outPixels;
17 outPixels.reserve(inPixels.size());
19 for(
unsigned rowOffset=0; rowOffset < inPixels.size(); rowOffset+=rowSize){
21 for(
unsigned j=0;j<rowSize;++j) {
23 outPixels.push_back(inPixels[rowOffset + rowSize - j - 1]);
26 sp.emplace(outPixels, rowSize);
optional< nsGui::Sprite > sp
optional actual Sprite We need to use an optional to init the object through a function,...
void mirror(MySprite &msp)
Mirror a sprite pixel data into this one.
Task asyncLoad(const string &fname)
load a sprite asynchronously