Files
MapLibreParticleLab/platform/ios/src/UIImage+MGLAdditions.h
Roman Blum 1045934d5e [core, ios, macos] Add image accessor to MGLStyle (#7096)
* [core] Add interface to get image from sprite atlas

* [tests] Add tests for Map::getImage

* [ios, macos] WIP: get MGLImage for name from style

* [ios, macos] Fixed -imageForName:

Convert from sprite images to platform images using the existing encodePNG() function, which is also used for printing. Allow -imageForName: to return nil without an assertion failure. Added a basic test.
2016-12-05 17:16:13 -08:00

16 lines
299 B
Objective-C

#import <UIKit/UIKit.h>
#include <mbgl/sprite/sprite_image.hpp>
NS_ASSUME_NONNULL_BEGIN
@interface UIImage (MGLAdditions)
- (nullable instancetype)initWithMGLSpriteImage:(const mbgl::SpriteImage *)spriteImage;
- (std::unique_ptr<mbgl::SpriteImage>)mgl_spriteImage;
@end
NS_ASSUME_NONNULL_END