summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-16 13:44:12 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-17 11:23:47 -0700
commit786707649a2efcddd24fb976150b044097d74219 (patch)
treebdeaffb1b923d0c8f10ec11f8119fd2dff2b7db8 /platform
parent63558e06ad4fbc33ad3bdec57dc0ead2b369a7b0 (diff)
downloadqtlocation-mapboxgl-786707649a2efcddd24fb976150b044097d74219.tar.gz
[core] Remove ambiguous get{Width,Height} accessors from style::Image
Diffstat (limited to 'platform')
-rw-r--r--platform/macos/src/NSImage+MGLAdditions.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/macos/src/NSImage+MGLAdditions.mm b/platform/macos/src/NSImage+MGLAdditions.mm
index 6bb8fca68b..ecd8aabe15 100644
--- a/platform/macos/src/NSImage+MGLAdditions.mm
+++ b/platform/macos/src/NSImage+MGLAdditions.mm
@@ -23,7 +23,9 @@
NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithCGImage:image];
CGImageRelease(image);
- if (self = [self initWithSize:NSMakeSize(styleImage->getWidth(), styleImage->getHeight())]) {
+ CGFloat w = styleImage->getImage().size.width / styleImage->getPixelRatio();
+ CGFloat h = styleImage->getImage().size.height / styleImage->getPixelRatio();
+ if (self = [self initWithSize:NSMakeSize(w, h)]) {
[self addRepresentation:rep];
[self setTemplate:styleImage->isSdf()];
}