#include "stdafx.h" #include "restore_new.h" #include "Utilities/Log.h" #pragma warning(push) #pragma message("TODO: remove wx dependency: ") #pragma warning(disable : 4996) #include #pragma warning(pop) #include "define_new_memleakdetect.h" #ifndef _WIN32 #include #endif #include "rPlatform.h" rImage::rImage() { handle = static_cast(new wxImage()); } rImage::~rImage() { delete static_cast(handle); } void rImage::Create(int width, int height, void *data, void *alpha) { static_cast(handle)->Create(width, height, static_cast(data), static_cast(alpha)); } void rImage::SaveFile(const std::string& name, rImageType type) { if (type == rBITMAP_TYPE_PNG) { static_cast(handle)->SaveFile(fmt::FromUTF8(name),wxBITMAP_TYPE_PNG); } else { throw EXCEPTION("unsupported type"); } }