diff options
author | crupest <crupest@outlook.com> | 2020-06-22 01:09:24 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-22 01:09:24 +0800 |
commit | 4f0a2f32c273780c32cc3937615c2a8bbd993aab (patch) | |
tree | 6e1f45447854a40fe2d16ef9bec79f3c0fef030a /include/cru/win/graph/direct/TextLayout.hpp | |
parent | d86a71f79afe0e4dac768f61d6bff690567aca5b (diff) | |
download | cru-4f0a2f32c273780c32cc3937615c2a8bbd993aab.tar.gz cru-4f0a2f32c273780c32cc3937615c2a8bbd993aab.tar.bz2 cru-4f0a2f32c273780c32cc3937615c2a8bbd993aab.zip |
...
Diffstat (limited to 'include/cru/win/graph/direct/TextLayout.hpp')
-rw-r--r-- | include/cru/win/graph/direct/TextLayout.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/cru/win/graph/direct/TextLayout.hpp b/include/cru/win/graph/direct/TextLayout.hpp index 1a378ed4..40c63dbe 100644 --- a/include/cru/win/graph/direct/TextLayout.hpp +++ b/include/cru/win/graph/direct/TextLayout.hpp @@ -4,6 +4,7 @@ #include "cru/platform/graph/TextLayout.hpp" +#include <limits> #include <memory> namespace cru::platform::graph::win::direct { @@ -47,8 +48,8 @@ class DWriteTextLayout : public DirectGraphResource, std::string text_; std::wstring w_text_; std::shared_ptr<DWriteFont> font_; - float max_width_ = 10000.0f; - float max_height_ = 10000.0f; + float max_width_ = std::numeric_limits<float>::max(); + float max_height_ = std::numeric_limits<float>::max(); Microsoft::WRL::ComPtr<IDWriteTextLayout> text_layout_; }; } // namespace cru::platform::graph::win::direct |