Browse Source

Return proper bounds in NanoVG::textBounds

pull/56/head
Patrick Desaulniers GitHub 7 years ago
parent
commit
6df38f9b47
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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