summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/image/image_data.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/image/image_data.h')
-rw-r--r--source/modules/asura-core/image/image_data.h81
1 files changed, 0 insertions, 81 deletions
diff --git a/source/modules/asura-core/image/image_data.h b/source/modules/asura-core/image/image_data.h
deleted file mode 100644
index 93e3448..0000000
--- a/source/modules/asura-core/image/image_data.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef __ASURA_ENGINE_IMAGEDATA_H__
-#define __ASURA_ENGINE_IMAGEDATA_H__
-
-#include <list>
-
-#include <asura-utils/scripting/portable.hpp>
-#include <asura-utils/io/decoded_data.h>
-#include <asura-utils/io/data_buffer.h>
-#include <asura-utils/threading/thread.h>
-#include <asura-utils/threading/mutex.h>
-
-#include "../graphics/texture.h"
-#include "../graphics/color.h"
-
-namespace_begin(AsuraEngine)
-namespace_begin(Image)
-
-class ImageDecoder;
-
-class ImageData ASURA_FINAL
- : public Scripting::Portable<ImageData>
- , public AEIO::DecodedData
-{
-public:
-
- ///
- /// ͼƬļϢʧܣ׳쳣
- ///
- ImageData();
- ~ImageData();
-
- void Decode(AEIO::DataBuffer& buffer) override;
-
- void Lock();
- void Unlock();
-
- AEGraphics::Color GetPixel(uint x, uint y);
-
- //----------------------------------------------------------------------------//
-
- uint width, height; // سߴ
- AEGraphics::ColorFormat format; // ʽ
- byte* pixels; //
- std::size_t size; // ݳ
-
- //----------------------------------------------------------------------------//
-
-private:
-
- ///
- /// ڵһ׼image dataʱṩdecoderڼdecodersмѡԡ
- ///
- static std::list<ImageDecoder*> ImageDecoders;
-
- ///
- /// дݵ
- ///
- AEThreading::Mutex m_Mutex;
-
-luaxport:
-
- LUAX_DECL_FACTORY(ImageData);
-
- LUAX_DECL_METHOD(_New);
- LUAX_DECL_METHOD(_GetPixel);
- LUAX_DECL_METHOD(_GetSize);
- LUAX_DECL_METHOD(_GetWidth);
- LUAX_DECL_METHOD(_GetHeight);
- LUAX_DECL_METHOD(_GetPixelFormat);
- LUAX_DECL_METHOD(_Decode);
- LUAX_DECL_METHOD(_DecodeAsync);
- LUAX_DECL_METHOD(_IsAvailable);
-
-};
-
-namespace_end
-namespace_end
-
-namespace AEImage = AsuraEngine::Image;
-
-#endif \ No newline at end of file