aboutsummaryrefslogtreecommitdiff
path: root/CruUI/graph/graph.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-04 01:05:25 +0800
committercrupest <crupest@outlook.com>2018-09-04 01:05:25 +0800
commit1a2cf75e94b98a649b2b1e87d62e3a3be9de5ea1 (patch)
tree03f15c6d29add5ee38e4d12b587d3e9659cba786 /CruUI/graph/graph.h
parent9397b9fb89e389906ec9f6c9ea3ca18073593c8c (diff)
downloadcru-1a2cf75e94b98a649b2b1e87d62e3a3be9de5ea1.tar.gz
cru-1a2cf75e94b98a649b2b1e87d62e3a3be9de5ea1.tar.bz2
cru-1a2cf75e94b98a649b2b1e87d62e3a3be9de5ea1.zip
...
Diffstat (limited to 'CruUI/graph/graph.h')
-rw-r--r--CruUI/graph/graph.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/CruUI/graph/graph.h b/CruUI/graph/graph.h
index 69d11b9c..b221115a 100644
--- a/CruUI/graph/graph.h
+++ b/CruUI/graph/graph.h
@@ -9,12 +9,12 @@
namespace cru
{
namespace graph
- {
+ {
class GraphManager;
//Represents a window render target.
class WindowRenderTarget : public Object
- {
+ {
public:
WindowRenderTarget(GraphManager* graph_manager, HWND hwnd);
WindowRenderTarget(const WindowRenderTarget& other) = delete;
@@ -58,13 +58,16 @@ namespace cru
};
struct Dpi
- {
+ {
float x;
float y;
};
class GraphManager : public Object
- {
+ {
+ public:
+ static GraphManager* GetInstance();
+
public:
GraphManager();
GraphManager(const GraphManager& other) = delete;
@@ -94,6 +97,12 @@ namespace cru
return dxgi_factory_;
}
+ Microsoft::WRL::ComPtr<IDWriteFactory> GetDWriteFactory() const
+ {
+ return dwrite_factory_;
+ }
+
+
//Create a window render target with the HWND.
std::shared_ptr<WindowRenderTarget> CreateWindowRenderTarget(HWND hwnd);