aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-05 19:31:18 +0800
committercrupest <crupest@outlook.com>2022-05-05 19:31:18 +0800
commit7b4b334e777e573040569801d3b4ab28a606a127 (patch)
tree91db9cf17dd1936e44dc21c2e86d61642129bd41 /include/cru/platform
parent5bc684dcc1d121bf6e02d0800174c7977c72d101 (diff)
downloadcru-7b4b334e777e573040569801d3b4ab28a606a127.tar.gz
cru-7b4b334e777e573040569801d3b4ab28a606a127.tar.bz2
cru-7b4b334e777e573040569801d3b4ab28a606a127.zip
...
Diffstat (limited to 'include/cru/platform')
-rw-r--r--include/cru/platform/graphics/ImageFactory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/cru/platform/graphics/ImageFactory.h b/include/cru/platform/graphics/ImageFactory.h
index 2a7902b2..e74f57e0 100644
--- a/include/cru/platform/graphics/ImageFactory.h
+++ b/include/cru/platform/graphics/ImageFactory.h
@@ -7,5 +7,12 @@ namespace cru::platform::graphics {
struct CRU_PLATFORM_GRAPHICS_API IImageFactory
: public virtual IGraphicsResource {
virtual std::unique_ptr<IImage> DecodeFromStream(io::Stream* stream) = 0;
+
+ /**
+ * \brief Create an empty bitmap with given width and height.
+ * \remarks Implementation should ensure that the bitmap supports alpha
+ * channel. It had better be in 32-bit rgba format.
+ */
+ virtual std::unique_ptr<IImage> CreateBitmap(int width, int height) = 0;
};
} // namespace cru::platform::graphics