diff options
Diffstat (limited to 'source/libs/asura-lib-core/graphics/image_data.h')
-rw-r--r-- | source/libs/asura-lib-core/graphics/image_data.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source/libs/asura-lib-core/graphics/image_data.h b/source/libs/asura-lib-core/graphics/image_data.h index 1e711a8..53a9e85 100644 --- a/source/libs/asura-lib-core/graphics/image_data.h +++ b/source/libs/asura-lib-core/graphics/image_data.h @@ -3,9 +3,10 @@ #include <list> -#include "scripting/luax.hpp" -#include "filesystem/decoded_data.h" -#include "image_decoder.h" +#include <asura-lib-utils/scripting/portable.hpp> +#include <asura-lib-utils/filesystem/decoded_data.h> +#include <asura-lib-utils/filesystem/data_buffer.h> + #include "pixel_format.h" #include "color.h" @@ -14,9 +15,11 @@ namespace AsuraEngine namespace Graphics { + class ImageDecoder; + class ImageData ASURA_FINAL : public Filesystem::DecodedData - , public Scripting::Portable + , public Scripting::Portable<ImageData> { public: @@ -24,7 +27,6 @@ namespace AsuraEngine /// ͼƬļϢʧܣ׳쳣 /// ImageData(const Filesystem::DataBuffer& buffer); - ~ImageData(); Color GetPixel(uint x, uint y); @@ -45,14 +47,14 @@ namespace AsuraEngine public: - //---------------------------------------------------------------------------------------------------------- - LUAX_DECL_FACTORY(ImageData); - LUAX_DECL_METHOD(l_GetPixel); - LUAX_DECL_METHOD(l_GetSize); - - //---------------------------------------------------------------------------------------------------------- + LUAX_DECL_METHOD(_New); + LUAX_DECL_METHOD(_GetPixel); + LUAX_DECL_METHOD(_GetSize); + LUAX_DECL_METHOD(_GetWidth); + LUAX_DECL_METHOD(_GetHeight); + LUAX_DECL_METHOD(_GetPixelFormat); }; |