diff options
author | chai <chaifix@163.com> | 2018-10-18 07:58:07 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-18 07:58:07 +0800 |
commit | b27581c3d9657a4a05191e47eed78d00ec0a46cd (patch) | |
tree | 1d461a5642645f98fe37517884d02c6c53434cd5 /src/libjin/Graphics/Image.h | |
parent | dce7b78db8a7071217b1439c4b7f6a341ce37cf1 (diff) |
*注释
Diffstat (limited to 'src/libjin/Graphics/Image.h')
-rw-r--r-- | src/libjin/Graphics/Image.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/libjin/Graphics/Image.h b/src/libjin/Graphics/Image.h index bed1986..53eb0d7 100644 --- a/src/libjin/Graphics/Image.h +++ b/src/libjin/Graphics/Image.h @@ -8,18 +8,44 @@ namespace jin namespace graphics { - /* just like bitmap but only from image file*/ - /* readonly bitmap */ + /// + /// A readonly bitmap. + /// + /// Just like bitmap but only from image file. The pixels data + /// is readonly. + /// class Image : public Bitmap { public: + /// + /// Create image from image file. + /// + /// @param path Image path. + /// @return Image if created successfully, otherwise return null. + /// static Image* createImage(const char* path); + + /// + /// Create image from image data. + /// + /// @param imgData Image data to create image. + /// @param size Size of image data. + /// @return Image if created successfully, otherwise return null. + /// static Image* createImage(const void* imgData, size_t size); + + /// + /// Image destructor. + /// ~Image(); private: + /// + /// Image constructor. + /// Image(); + // Disable setters inherited from Bitmap. void bind(Color* pixels, int w, int h); void resetPixels(const Color* pixels, int w, int h); void resetPixels(const Color& pixels, int w, int h); @@ -29,7 +55,7 @@ namespace jin }; - } -} + } // namespace graphics +} // namespace jin #endif
\ No newline at end of file |