diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2015-05-28 19:15:56 -0400 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2015-05-28 19:17:07 -0400 |
commit | fd19eb79056b8e62f037c0ae4532f4f7cc970580 (patch) | |
tree | 431800e45c50d4489f2f091ab5f0168b3b08729f /src/mbgl/text/shaping.cpp | |
parent | 4cd95a97c65074207e8ede9667484f9390167245 (diff) | |
download | qtlocation-mapboxgl-fd19eb79056b8e62f037c0ae4532f4f7cc970580.tar.gz |
fix shaped icon box sizes
Diffstat (limited to 'src/mbgl/text/shaping.cpp')
-rw-r--r-- | src/mbgl/text/shaping.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/text/shaping.cpp b/src/mbgl/text/shaping.cpp index 971b695e49..35fe5dc24b 100644 --- a/src/mbgl/text/shaping.cpp +++ b/src/mbgl/text/shaping.cpp @@ -6,11 +6,10 @@ namespace mbgl { PositionedIcon shapeIcon(const Rect<uint16_t> &image, const StyleLayoutSymbol &layout) { float dx = layout.icon.offset[0]; float dy = layout.icon.offset[1]; - // TODO, this is image.image.width in -js float x1 = dx - image.originalW / 2.0f; - float x2 = x1 + image.w; + float x2 = x1 + image.originalW; float y1 = dy - image.originalH / 2.0f; - float y2 = y1 + image.h; + float y2 = y1 + image.originalH; return PositionedIcon(image, y1, y2, x1, x2); } |