#include "ImageViewFactory.hpp" #include #include using namespace pixelarium::ui; std::unique_ptr ImageViewFactory::RenderImage(size_t image_id) { auto img{this->image_pool_.GetResource(image_id)}; if (!img.has_value()) return nullptr; // beware: here we copy the actual image resource over to the new image return std::make_unique(std::make_shared(*img.value())); }