diff options
Diffstat (limited to 'include/cru/platform/graphics')
-rw-r--r-- | include/cru/platform/graphics/Factory.hpp | 4 | ||||
-rw-r--r-- | include/cru/platform/graphics/Image.hpp | 6 | ||||
-rw-r--r-- | include/cru/platform/graphics/ImageFactory.hpp | 11 |
3 files changed, 21 insertions, 0 deletions
diff --git a/include/cru/platform/graphics/Factory.hpp b/include/cru/platform/graphics/Factory.hpp index f3802651..7aa88ebd 100644 --- a/include/cru/platform/graphics/Factory.hpp +++ b/include/cru/platform/graphics/Factory.hpp @@ -4,6 +4,8 @@ #include "Brush.hpp" #include "Font.hpp" #include "Geometry.hpp" +#include "Image.hpp" +#include "ImageFactory.hpp" #include "TextLayout.hpp" namespace cru::platform::graphics { @@ -24,5 +26,7 @@ struct CRU_PLATFORM_GRAPHICS_API IGraphicsFactory : virtual IPlatformResource { brush->SetColor(color); return brush; } + + virtual IImageFactory* GetImageFactory() = 0; }; } // namespace cru::platform::graphics diff --git a/include/cru/platform/graphics/Image.hpp b/include/cru/platform/graphics/Image.hpp new file mode 100644 index 00000000..bf1e8545 --- /dev/null +++ b/include/cru/platform/graphics/Image.hpp @@ -0,0 +1,6 @@ +#pragma once +#include "Resource.hpp" + +namespace cru::platform::graphics { +struct CRU_PLATFORM_GRAPHICS_API IImage : public virtual IGraphicsResource {}; +} // namespace cru::platform::graphics diff --git a/include/cru/platform/graphics/ImageFactory.hpp b/include/cru/platform/graphics/ImageFactory.hpp new file mode 100644 index 00000000..3997f783 --- /dev/null +++ b/include/cru/platform/graphics/ImageFactory.hpp @@ -0,0 +1,11 @@ +#pragma once +#include "Image.hpp" +#include "Resource.hpp" +#include "cru/common/io/Stream.hpp" + +namespace cru::platform::graphics { +struct CRU_PLATFORM_GRAPHICS_API IImageFactory + : public virtual IGraphicsResource { + virtual std::unique_ptr<IImage> DecodeFromStream(io::Stream* stream) = 0; +}; +} // namespace cru::platform::graphics |