From 786707649a2efcddd24fb976150b044097d74219 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 16 May 2017 13:44:12 -0700 Subject: [core] Remove ambiguous get{Width,Height} accessors from style::Image --- platform/macos/src/NSImage+MGLAdditions.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'platform') 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()]; } -- cgit v1.2.1