blob: 2c787dd7a6fc5b8e4929dcc69b9370ebe63a81d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "cru/platform/graphics/Image.h"
#include "cru/platform/graphics/Factory.h"
#include "cru/platform/graphics/ImageFactory.h"
#include "cru/platform/graphics/Painter.h"
namespace cru::platform::graphics {
std::unique_ptr<IImage> IImage::CloneToBitmap() {
auto image = GetGraphicsFactory()->GetImageFactory()->CreateBitmap(
GetWidth(), GetHeight());
auto painter = image->CreatePainter();
painter->DrawImage(Point{}, this);
return image;
}
} // namespace cru::platform::graphics
|