6 return std::async(std::launch::async, [fname,
this]() ->
void {
7 ptr = std::make_unique<nsGui::Sprite>(fname);
12 const vector<RGBAcolor>& inPixels = msp.
ptr->getPixelData();
13 unsigned rowSize = msp.
ptr->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 ptr = std::make_unique<nsGui::Sprite>(outPixels, rowSize);
future< void > asyncLoad(const string &fname)
void mirror(MySprite &msp)
unique_ptr< nsGui::Sprite > ptr