summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Desaulniers <desaulniers.patrick@carrefour.cegepvicto.ca>2018-06-05 13:28:28 -0400
committerFilipe Coelho <falktx@falktx.com>2018-06-05 19:28:27 +0200
commit2786991ed9423fdfdb984f40946748e725efa933 (patch)
tree2dd8ce96502f6823966dd1234a5afb4921d5bab0
parent44d2a6fba7e9113197749650dd7767891780d59b (diff)
Return proper bounds in NanoVG::textBounds (#56)
-rw-r--r--dgl/src/NanoVG.cpp2
1 files changed, 1 insertions, 1 deletions
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<float>(b[0], b[1], b[2], b[3]);
+ bounds = Rectangle<float>(b[0], b[1], b[2] - b[0], b[3] - b[1]);
return ret;
}