From fc1713e9df3ae8db6e612610023e7bd5f6b6f5fe Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Jan 2019 23:09:54 +0800 Subject: *misc --- Source/Asura.Engine/Graphics/Image.h | 69 ++---------------------------------- 1 file changed, 3 insertions(+), 66 deletions(-) (limited to 'Source/Asura.Engine/Graphics/Image.h') diff --git a/Source/Asura.Engine/Graphics/Image.h b/Source/Asura.Engine/Graphics/Image.h index 503baab..e84dd6c 100644 --- a/Source/Asura.Engine/Graphics/Image.h +++ b/Source/Asura.Engine/Graphics/Image.h @@ -1,9 +1,9 @@ #ifndef __ASURA_ENGINE_IMAGE_H__ #define __ASURA_ENGINE_IMAGE_H__ -#include "Containers/StringMap.hpp" -#include "Containers/String.h" -#include "Containers/Map.h" +#include "StringMap.hpp" +#include "String.h" +#include "Map.h" #include "Math/Vector2.h" #include "Manager.hpp" #include "Texture.h" @@ -57,69 +57,6 @@ namespace AsuraEngine }; - /// - /// - /// - class ImageManager : public Manager - { - public: - - /// - /// 通过ID获取路径,如果是程序创建的图片,返回String::Null - /// - Containers::String GetImagePath(uint ID); - - /// - /// 通过ID路径获取ID,如果没找到,返回0 - /// - uint GetImageID(const Containers::String& path); - - Image* GetImage(const Containers::String& path); - - Image* GetImage(const Containers::String& ID); - - uint AddImage(const Containers::String& path, Image* image); - - uint AddImage(Image* image); - - bool RemoveImage(uint ID); - - bool RemoveImage(Image* image); - - private: - - /// - /// 所有的image - /// - Containers::Map mImages; - - /// - /// image,路径和ID的映射。针对从.asr导入的image,通过路径可以拿到image。所以并不是所有的image都在此map中。由 - /// 程序创建的image只能通过ID来获取,所以程序中需要保留ID。 - /// - Containers::StringMap mImageIDs; - - }; - - /// - /// - /// - class ImageFactory : public Factory - { - public: - - /// - /// 从image pixel数据中构建image - /// - Image* ReadBuffer(Color* pixels, int width, int height); - - /// - /// 从image extern数据并返回 - /// - Image* Decode(); - - }; - } } -- cgit v1.1-26-g67d0