aboutsummaryrefslogtreecommitdiff
path: root/src/ui/convert_util.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-13 22:24:17 +0800
committercrupest <crupest@outlook.com>2018-11-13 22:24:17 +0800
commit38a523be0085a9b529043bddc61e4aee04a6768d (patch)
tree4003c4795f111631f1df07e0b1fdd1c2b626b608 /src/ui/convert_util.hpp
parent91dda866a0919f9e6cfb5e7857ac0466572d96d8 (diff)
downloadcru-38a523be0085a9b529043bddc61e4aee04a6768d.tar.gz
cru-38a523be0085a9b529043bddc61e4aee04a6768d.tar.bz2
cru-38a523be0085a9b529043bddc61e4aee04a6768d.zip
Add enhanced bound check.
Diffstat (limited to 'src/ui/convert_util.hpp')
-rw-r--r--src/ui/convert_util.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/convert_util.hpp b/src/ui/convert_util.hpp
index 1c18f59b..6deb7fff 100644
--- a/src/ui/convert_util.hpp
+++ b/src/ui/convert_util.hpp
@@ -6,6 +6,11 @@
namespace cru::ui
{
+ inline D2D1_POINT_2F Convert(const Point& point)
+ {
+ return D2D1::Point2F(point.x, point.y);
+ }
+
inline D2D1_RECT_F Convert(const Rect& rect)
{
return D2D1::RectF(rect.left, rect.top, rect.left + rect.width, rect.top + rect.height);