diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-16 13:44:12 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-17 11:23:47 -0700 |
commit | 786707649a2efcddd24fb976150b044097d74219 (patch) | |
tree | bdeaffb1b923d0c8f10ec11f8119fd2dff2b7db8 /src/mbgl/sprite/sprite_atlas.cpp | |
parent | 63558e06ad4fbc33ad3bdec57dc0ead2b369a7b0 (diff) | |
download | qtlocation-mapboxgl-786707649a2efcddd24fb976150b044097d74219.tar.gz |
[core] Remove ambiguous get{Width,Height} accessors from style::Image
Diffstat (limited to 'src/mbgl/sprite/sprite_atlas.cpp')
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp index 2175077c1f..20c062a779 100644 --- a/src/mbgl/sprite/sprite_atlas.cpp +++ b/src/mbgl/sprite/sprite_atlas.cpp @@ -22,14 +22,14 @@ SpriteAtlasElement::SpriteAtlasElement(Rect<uint16_t> rect_, : pos(std::move(rect_)), sdf(image.sdf), relativePixelRatio(image.pixelRatio / pixelRatio), - width(image.getWidth()), - height(image.getHeight()) { + width(image.image.size.width / image.pixelRatio), + height(image.image.size.height / image.pixelRatio) { - const float w = image.getWidth() * relativePixelRatio; - const float h = image.getHeight() * relativePixelRatio; + const float w = image.image.size.width / pixelRatio; + const float h = image.image.size.height / pixelRatio; - size = {{ float(image.getWidth()), image.getHeight() }}; + size = {{ width, height }}; tl = {{ float(pos.x + padding) / size_.width, float(pos.y + padding) / size_.height }}; br = {{ float(pos.x + padding + w) / size_.width, float(pos.y + padding + h) / size_.height }}; } |