From c302f5ae5f9e30a28e487e8a764d9cc31546bbea Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 22:51:04 +0800 Subject: *rename --- source/libs/asura-lib-core/graphics/image_data.h | 68 ------------------------ 1 file changed, 68 deletions(-) delete mode 100644 source/libs/asura-lib-core/graphics/image_data.h (limited to 'source/libs/asura-lib-core/graphics/image_data.h') diff --git a/source/libs/asura-lib-core/graphics/image_data.h b/source/libs/asura-lib-core/graphics/image_data.h deleted file mode 100644 index 820e276..0000000 --- a/source/libs/asura-lib-core/graphics/image_data.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __ASURA_ENGINE_IMAGEDATA_H__ -#define __ASURA_ENGINE_IMAGEDATA_H__ - -#include - -#include -#include -#include -#include - -#include "pixel_format.h" -#include "color.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class ImageDecoder; - - class ImageData ASURA_FINAL - : public AEIO::DecodedData - , public Scripting::Portable - { - public: - - LUAX_DECL_FACTORY(ImageData); - - /// - /// 解析图片数据文件,并构建像素信息,如果解析失败,抛出异常 - /// - ImageData(const AEIO::DataBuffer& buffer); - ~ImageData(); - - void Load(const AEIO::DataBuffer& buffer); - void LoadAsync(const AEIO::DataBuffer& buffer, AEThreading::Thread* thread); - - Color GetPixel(uint x, uint y); - - uint width, height; - PixelFormat format; - std::size_t size; - byte* pixels; - - private: - - void Decode(const AEIO::DataBuffer& buffer) override; - - /// - /// 在第一次准备image data时构建所有提供的decoder。在几个decoders中间选择解析策略。 - /// - static std::list ImageDecoders; - - LUAX_DECL_METHOD(_New); - LUAX_DECL_METHOD(_GetPixel); - LUAX_DECL_METHOD(_GetSize); - LUAX_DECL_METHOD(_GetWidth); - LUAX_DECL_METHOD(_GetHeight); - LUAX_DECL_METHOD(_GetPixelFormat); - - }; - - } -} - -namespace AEGraphics = AsuraEngine::Graphics; - -#endif \ No newline at end of file -- cgit v1.1-26-g67d0