From 82956beb1fe17e1226327638c8ab22b5f5adfc1d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 20 Mar 2019 22:43:25 +0800 Subject: *misc --- source/libs/asura-lib-core/graphics/image_data.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (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 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 -#include "scripting/luax.hpp" -#include "filesystem/decoded_data.h" -#include "image_decoder.h" +#include +#include +#include + #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 { 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); }; -- cgit v1.1-26-g67d0