diff options
Diffstat (limited to 'source/modules/asura-core/graphics/image.h')
-rw-r--r-- | source/modules/asura-core/graphics/image.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/source/modules/asura-core/graphics/image.h b/source/modules/asura-core/graphics/image.h index 29fd97c..377e002 100644 --- a/source/modules/asura-core/graphics/image.h +++ b/source/modules/asura-core/graphics/image.h @@ -27,9 +27,9 @@ namespace AsuraEngine /// һֻࡣҪǿǵeditorengineʹòͬķװ /// class Image ASURA_FINAL - : public Drawable + : public Texture , public Scripting::Portable<Image> - , public AEIO::Reloadable + , public AEIO::Renewable { public: @@ -40,19 +40,17 @@ namespace AsuraEngine ~Image(); /// - /// bufferimageϢmPixelsΪգݡ¹image - /// ʹglTexImage2Dύimageݡ + /// ͼύGPUϢ¹imageʹglTexImage2D + /// ύimageݡ /// - bool Load(ImageData* data); + bool Refresh(AEIO::DecodedData* decodeData) override; + bool Refresh(AEIO::DecodedData* decodeData, const AEMath::Recti& rect); - uint GetWidth(); - uint GetHeight(); - Math::Vector2u GetSize(); - /// - /// ijһλõ - /// - Color32 GetPixel(uint x, uint y); + uint GetWidth(); + uint GetHeight(); + Math::Vector2u GetSize(); + Color32 GetPixel(uint x, uint y); void Render(const RenderTarget* rt, const RenderState& state) override; @@ -60,13 +58,14 @@ namespace AsuraEngine private: + /// + /// һͼƬһݵá + /// ImageData* mImageData; Luax::LuaxMemberRef mImageDataRef; - Math::Vector2u mSize; - LUAX_DECL_METHOD(_New); - LUAX_DECL_METHOD(_Load); + LUAX_DECL_METHOD(_Refresh); LUAX_DECL_METHOD(_GetWidth); LUAX_DECL_METHOD(_GetHeight); LUAX_DECL_METHOD(_GetSize); |