[core] Split style image collection from SpriteAtlas
This commit is contained in:
committed by
John Firebaugh
parent
c80f3e9d29
commit
cc9f040a2d
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user