Browse Source

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

pull/28/merge
Patrick Desaulniers Filipe Coelho <falktx@falktx.com> 5 years ago
parent
commit
2786991ed9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      dgl/src/NanoVG.cpp

+ 1
- 1
dgl/src/NanoVG.cpp View File

@@ -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;
}



Loading…
Cancel
Save