summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/image/image_data.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-07-31 21:35:12 +0800
committerchai <chaifix@163.com>2019-07-31 21:35:12 +0800
commit084623519e95f0ab0cf4bc328b5fa736d679c5bd (patch)
tree9d409dceda50335e9fb881fc5107c9c1c561f988 /source/modules/asura-core/image/image_data.h
parent012a44bd13ab41d056e7d3884a39027b6cea62b5 (diff)
*修改名称空间风格
Diffstat (limited to 'source/modules/asura-core/image/image_data.h')
-rw-r--r--source/modules/asura-core/image/image_data.h94
1 files changed, 46 insertions, 48 deletions
diff --git a/source/modules/asura-core/image/image_data.h b/source/modules/asura-core/image/image_data.h
index 8b4f04a..93e3448 100644
--- a/source/modules/asura-core/image/image_data.h
+++ b/source/modules/asura-core/image/image_data.h
@@ -12,71 +12,69 @@
#include "../graphics/texture.h"
#include "../graphics/color.h"
-namespace AsuraEngine
-{
- namespace Image
- {
+namespace_begin(AsuraEngine)
+namespace_begin(Image)
- class ImageDecoder;
+class ImageDecoder;
- class ImageData ASURA_FINAL
- : public Scripting::Portable<ImageData>
- , public AEIO::DecodedData
- {
- public:
+class ImageData ASURA_FINAL
+ : public Scripting::Portable<ImageData>
+ , public AEIO::DecodedData
+{
+public:
- ///
- /// ͼƬļϢʧܣ׳쳣
- ///
- ImageData();
- ~ImageData();
+ ///
+ /// ͼƬļϢʧܣ׳쳣
+ ///
+ ImageData();
+ ~ImageData();
- void Decode(AEIO::DataBuffer& buffer) override;
+ void Decode(AEIO::DataBuffer& buffer) override;
- void Lock();
- void Unlock();
+ void Lock();
+ void Unlock();
- AEGraphics::Color GetPixel(uint x, uint y);
+ AEGraphics::Color GetPixel(uint x, uint y);
- //----------------------------------------------------------------------------//
+ //----------------------------------------------------------------------------//
- uint width, height; // سߴ
- AEGraphics::ColorFormat format; // ʽ
- byte* pixels; //
- std::size_t size; // ݳ
+ uint width, height; // سߴ
+ AEGraphics::ColorFormat format; // ʽ
+ byte* pixels; //
+ std::size_t size; // ݳ
- //----------------------------------------------------------------------------//
+ //----------------------------------------------------------------------------//
- private:
+private:
- ///
- /// ڵһ׼image dataʱṩdecoderڼdecodersмѡԡ
- ///
- static std::list<ImageDecoder*> ImageDecoders;
+ ///
+ /// ڵһ׼image dataʱṩdecoderڼdecodersмѡԡ
+ ///
+ static std::list<ImageDecoder*> ImageDecoders;
- ///
- /// дݵ
- ///
- AEThreading::Mutex m_Mutex;
+ ///
+ /// дݵ
+ ///
+ AEThreading::Mutex m_Mutex;
- luaxport:
+luaxport:
- LUAX_DECL_FACTORY(ImageData);
+ 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);
+ 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;