diff --git a/ReactCommon/fabric/graphics/Geometry.h b/ReactCommon/fabric/graphics/Geometry.h index d3a3846961c..b1c05ab7a95 100644 --- a/ReactCommon/fabric/graphics/Geometry.h +++ b/ReactCommon/fabric/graphics/Geometry.h @@ -141,6 +141,26 @@ struct RectangleEdges { } }; +template +RectangleEdges operator+( + RectangleEdges const &lhs, + RectangleEdges const &rhs) { + return RectangleEdges{lhs.left + rhs.left, + lhs.top + rhs.top, + lhs.right + rhs.right, + lhs.bottom + rhs.bottom}; +} + +template +RectangleEdges operator-( + RectangleEdges const &lhs, + RectangleEdges const &rhs) { + return RectangleEdges{lhs.left - rhs.left, + lhs.top - rhs.top, + lhs.right - rhs.right, + lhs.bottom - rhs.bottom}; +} + /* * Generic data structure describes some values associated with *corners* * of a rectangle.