From cfa8ed747e8b5047b4776aa02693d4867b9d0262 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 19 Jan 2018 19:11:59 +0000 Subject: [PATCH] Add a 16-bit Rect type and conversion function --- src/core/geometry_type.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index 2bd8ffbade..3ed889d57b 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -44,6 +44,24 @@ struct Rect { int bottom; }; +struct Rect16 { + int16 left; + int16 top; + int16 right; + int16 bottom; +}; + +template +OUT ConvertRect(const IN &in) +{ + OUT out; + out.left = in.left; + out.top = in.top; + out.right = in.right; + out.bottom = in.bottom; + return out; +} + /** * Specification of a rectangle with an absolute top-left coordinate and a * (relative) width/height