DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 2786991ed9423fdfdb984f40946748e725efa933
parent 44d2a6fba7e9113197749650dd7767891780d59b
Author: Patrick Desaulniers <desaulniers.patrick@carrefour.cegepvicto.ca>
Date:   Tue,  5 Jun 2018 13:28:01 -0400

Return proper bounds in NanoVG::textBounds (#56)


Diffstat:
Mdgl/src/NanoVG.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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; }