From 71f5e17680552a4a710cd3c25190584c5914720a Mon Sep 17 00:00:00 2001 From: Gilles Roudiere Date: Thu, 21 Dec 2017 23:51:46 +0100 Subject: Fixes grow_margin not working at all --- core/math/math_2d.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/math/math_2d.h b/core/math/math_2d.h index 60351445c0..bbef19de7a 100644 --- a/core/math/math_2d.h +++ b/core/math/math_2d.h @@ -336,9 +336,10 @@ struct Rect2 { g.size.height += p_by * 2; return g; } + inline Rect2 grow_margin(Margin p_margin, real_t p_amount) const { Rect2 g = *this; - g.grow_individual((MARGIN_LEFT == p_margin) ? p_amount : 0, + g = g.grow_individual((MARGIN_LEFT == p_margin) ? p_amount : 0, (MARGIN_TOP == p_margin) ? p_amount : 0, (MARGIN_RIGHT == p_margin) ? p_amount : 0, (MARGIN_BOTTOM == p_margin) ? p_amount : 0); -- cgit v1.2.3