From 6df38f9b47f62e280fe37a0a520b83402aaebfd3 Mon Sep 17 00:00:00 2001 From: Patrick Desaulniers Date: Tue, 5 Jun 2018 13:08:48 -0400 Subject: [PATCH] Return proper bounds in NanoVG::textBounds --- dgl/src/NanoVG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp index 8caeeb94..a54b02a8 100644 --- a/dgl/src/NanoVG.cpp +++ b/dgl/src/NanoVG.cpp @@ -865,7 +865,7 @@ float NanoVG::textBounds(float x, float y, const char* string, const char* end, float b[4]; const float ret = nvgTextBounds(fContext, x, y, string, end, b); - bounds = Rectangle(b[0], b[1], b[2], b[3]); + bounds = Rectangle(b[0], b[1], b[2] - b[0], b[3] - b[1]); return ret; }