diff options
author | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-05-12 23:19:00 +0300 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-12 13:19:00 -0700 |
commit | cc9f040a2d35293c51dcc5be9c7affea7f1263bd (patch) | |
tree | de62a5610e719f5bfe07226c3382d4d2a5e17530 /platform | |
parent | c80f3e9d29d1c26ccc88ef30f8f17329c9bfb1b7 (diff) | |
download | qtlocation-mapboxgl-cc9f040a2d35293c51dcc5be9c7affea7f1263bd.tar.gz |
[core] Split style image collection from SpriteAtlas
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/src/UIImage+MGLAdditions.mm | 6 | ||||
-rw-r--r-- | platform/macos/src/NSImage+MGLAdditions.mm | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/platform/ios/src/UIImage+MGLAdditions.mm b/platform/ios/src/UIImage+MGLAdditions.mm index db64d78232..4ced1e30d5 100644 --- a/platform/ios/src/UIImage+MGLAdditions.mm +++ b/platform/ios/src/UIImage+MGLAdditions.mm @@ -6,14 +6,14 @@ - (nullable instancetype)initWithMGLStyleImage:(const mbgl::style::Image *)styleImage { - CGImageRef image = CGImageFromMGLPremultipliedImage(styleImage->image.clone()); + CGImageRef image = CGImageFromMGLPremultipliedImage(styleImage->getImage().clone()); if (!image) { return nil; } - if (self = [self initWithCGImage:image scale:styleImage->pixelRatio orientation:UIImageOrientationUp]) + if (self = [self initWithCGImage:image scale:styleImage->getPixelRatio() orientation:UIImageOrientationUp]) { - if (styleImage->sdf) + if (styleImage->isSdf()) { self = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; } diff --git a/platform/macos/src/NSImage+MGLAdditions.mm b/platform/macos/src/NSImage+MGLAdditions.mm index 91c4f7bf66..fee3fe2751 100644 --- a/platform/macos/src/NSImage+MGLAdditions.mm +++ b/platform/macos/src/NSImage+MGLAdditions.mm @@ -16,7 +16,7 @@ } - (nullable instancetype)initWithMGLStyleImage:(const mbgl::style::Image *)styleImage { - CGImageRef image = CGImageFromMGLPremultipliedImage(styleImage->image.clone()); + CGImageRef image = CGImageFromMGLPremultipliedImage(styleImage->getImage().clone()); if (!image) { return nil; } @@ -25,7 +25,7 @@ CGImageRelease(image); if (self = [self initWithSize:NSMakeSize(styleImage->getWidth(), styleImage->getHeight())]) { [self addRepresentation:rep]; - [self setTemplate:styleImage->sdf]; + [self setTemplate:styleImage->isSdf()]; } return self; } |