diff options
Diffstat (limited to 'include/cru/platform/graph/graph_factory.hpp')
-rw-r--r-- | include/cru/platform/graph/graph_factory.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/cru/platform/graph/graph_factory.hpp b/include/cru/platform/graph/graph_factory.hpp new file mode 100644 index 00000000..51cf6f15 --- /dev/null +++ b/include/cru/platform/graph/graph_factory.hpp @@ -0,0 +1,26 @@ +#pragma once +#include "cru/common/base.hpp" + +#include "cru/common/ui_base.hpp" + +#include <memory> +#include <string> +#include <string_view> + +namespace cru::platform::graph { +struct SolidColorBrush; +struct GeometryBuilder; +struct FontDescriptor; +struct TextLayout; + +struct GraphFactory : virtual Interface { + static GraphFactory* GetInstance(); + + virtual SolidColorBrush* CreateSolidColorBrush(const ui::Color& color) = 0; + virtual GeometryBuilder* CreateGeometryBuilder() = 0; + virtual FontDescriptor* CreateFontDescriptor( + const std::wstring_view& font_family, float font_size) = 0; + virtual TextLayout* CreateTextLayout(std::shared_ptr<FontDescriptor> font, + std::wstring text) = 0; +}; +} // namespace cru::platform |