Source/Gorgon/Graphics/Bitmap.cpp

branch
4.x-dev
changeset 1704
a0fdf33ceefe
parent 1695
accb75196605
equal deleted inserted replaced
1703:e7ba5162aabb 1704:a0fdf33ceefe
277 for(int x=0; x<data.GetWidth(); x++) { 277 for(int x=0; x<data.GetWidth(); x++) {
278 img(x, y, 0) = data(x, y, alpha); 278 img(x, y, 0) = data(x, y, alpha);
279 } 279 }
280 } 280 }
281 281
282 Assume(img); 282 Assume(std::move(img));
283 } 283 }
284 284
285 void Bitmap::StripAlpha() { 285 void Bitmap::StripAlpha() {
286 if(!HasAlpha()) return; 286 if(!HasAlpha()) return;
287 287
300 } 300 }
301 } 301 }
302 } 302 }
303 } 303 }
304 304
305 Assume(img); 305 Assume(std::move(img));
306 } 306 }
307 307
308 void Bitmap::Grayscale(float ratio, GrayscaleConversionMethod method) { 308 void Bitmap::Grayscale(float ratio, GrayscaleConversionMethod method) {
309 mode = GetMode(); 309 mode = GetMode();
310 ColorMode newmode = mode; 310 ColorMode newmode = mode;
383 setcolor(x, y, c); 383 setcolor(x, y, c);
384 } 384 }
385 } 385 }
386 } 386 }
387 387
388 Assume(img); 388 Assume(std::move(img));
389 } 389 }
390 390
391 std::vector<Geometry::Bounds> Bitmap::CreateLinearAtlas(Containers::Collection<const Bitmap> list, AtlasMargin margins) { 391 std::vector<Geometry::Bounds> Bitmap::CreateLinearAtlas(Containers::Collection<const Bitmap> list, AtlasMargin margins) {
392 std::vector<Geometry::Bounds> ret; 392 std::vector<Geometry::Bounds> ret;
393 std::map<const Bitmap *, Geometry::Bounds> mapping; 393 std::map<const Bitmap *, Geometry::Bounds> mapping;
579 xx++; 579 xx++;
580 } 580 }
581 yy++; 581 yy++;
582 } 582 }
583 583
584 Assume(img); 584 Assume(std::move(img));
585 585
586 return ret; 586 return ret;
587 } 587 }
588 588
589 Geometry::Margin Bitmap::Trim(Geometry::Bounds bounds, bool left, bool top, bool right, bool bottom) { 589 Geometry::Margin Bitmap::Trim(Geometry::Bounds bounds, bool left, bool top, bool right, bool bottom) {

mercurial