diff options
| author | chai <chaifix@163.com> | 2019-03-30 21:49:29 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2019-03-30 21:49:29 +0800 |
| commit | 8164adb15b76f537f8b6c78b9992786b61d61cc8 (patch) | |
| tree | 6e42919e32258a3c495dcec54b0fda3e8e1977d8 /source/modules/asura-core/graphics/image.h | |
| parent | c270d033fa04873ee7a8925dbb00cae5edc4555c (diff) | |
*misc
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); |
