diff options
Diffstat (limited to 'include/cru/platform')
-rw-r--r-- | include/cru/platform/check.hpp | 6 | ||||
-rw-r--r-- | include/cru/platform/graph/painter.hpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/cru/platform/check.hpp b/include/cru/platform/check.hpp index 6128fe5a..6e353afb 100644 --- a/include/cru/platform/check.hpp +++ b/include/cru/platform/check.hpp @@ -1,8 +1,8 @@ #pragma once -#include "cru/common/format.hpp" #include "exception.hpp" #include "resource.hpp" +#include <fmt/format.h> #include <memory> #include <type_traits> @@ -13,7 +13,7 @@ TTarget* CheckPlatform(INativeResource* resource, Expects(resource); const auto result = dynamic_cast<TTarget*>(resource); if (result == nullptr) { - throw UnsupportPlatformException(util::Format( + throw UnsupportPlatformException(fmt::format( "Try to convert resource to target platform failed. Platform id of " "resource to convert: {} . Target platform id: {} .", resource->GetPlatformId(), target_platform)); @@ -30,7 +30,7 @@ std::shared_ptr<TTarget> CheckPlatform( Expects(resource); const auto result = std::dynamic_pointer_cast<TTarget>(resource); if (result == nullptr) { - throw UnsupportPlatformException(util::Format( + throw UnsupportPlatformException(fmt::format( "Try to convert resource to target platform failed. Platform id of " "resource to convert: {} . Target platform id: {} .", resource->GetPlatformId(), target_platform)); diff --git a/include/cru/platform/graph/painter.hpp b/include/cru/platform/graph/painter.hpp index 1f4ab7cb..b6eb5452 100644 --- a/include/cru/platform/graph/painter.hpp +++ b/include/cru/platform/graph/painter.hpp @@ -20,6 +20,10 @@ struct IPainter : virtual INativeResource { virtual void DrawText(const Point& offset, ITextLayout* text_layout, IBrush* brush) = 0; + virtual void PushLayer(const Rect& bounds) = 0; + + virtual void PopLayer() = 0; + virtual void EndDraw() = 0; }; } // namespace cru::platform::graph |