From f3a8fd608a9776ef0a5f547da918a32cf6074060 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 23 May 2020 23:50:00 +0800 Subject: ... --- include/cru/platform/check.hpp | 6 +++--- include/cru/platform/graph/painter.hpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'include/cru/platform') 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 #include #include @@ -13,7 +13,7 @@ TTarget* CheckPlatform(INativeResource* resource, Expects(resource); const auto result = dynamic_cast(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 CheckPlatform( Expects(resource); const auto result = std::dynamic_pointer_cast(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 -- cgit v1.2.3