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 /platform/macos | |
parent | 63558e06ad4fbc33ad3bdec57dc0ead2b369a7b0 (diff) | |
download | qtlocation-mapboxgl-786707649a2efcddd24fb976150b044097d74219.tar.gz |
[core] Remove ambiguous get{Width,Height} accessors from style::Image
Diffstat (limited to 'platform/macos')
-rw-r--r-- | platform/macos/src/NSImage+MGLAdditions.mm | 4 |
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()]; } |